Skip to content

Commit 6c8723f

Browse files
Add missing KotlinJvmTaskExecutorTest to the test suite (#1089)
* Add missing KotlinJvmTaskExecutorTest to the test suite Add missing KotlinJvmTaskExecutorTest to the test suite * Make fun public to expose to test * Fix test * Pass dep as associate deps * Revert "Pass dep as associate deps" This reverts commit 4f0b728.
1 parent e06ba90 commit 6c8723f

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

src/main/kotlin/io/bazel/kotlin/builder/tasks/jvm/CompilationTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ private val Directories.incrementalData
472472
* Create a new [JvmCompilationTask] with sources found in the generatedSources directory. This should be run after
473473
* annotation processors have been run.
474474
*/
475-
internal fun JvmCompilationTask.expandWithGeneratedSources(): JvmCompilationTask =
475+
fun JvmCompilationTask.expandWithGeneratedSources(): JvmCompilationTask =
476476
expandWithSources(
477477
Stream.of(directories.generatedSources, directories.generatedJavaSources)
478478
.map { s -> Paths.get(s) }

src/test/kotlin/io/bazel/kotlin/builder/tasks/BUILD.bazel

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ kt_rules_test(
9797
],
9898
)
9999

100+
kt_rules_test(
101+
name = "KotlinJvmTaskExecutorTest",
102+
srcs = ["jvm/KotlinJvmTaskExecutorTest.kt"],
103+
deps = [
104+
"//kotlin/compiler:kotlin-test",
105+
"//src/main/kotlin/io/bazel/kotlin/builder/tasks",
106+
"@kotlin_rules_maven//:junit_junit",
107+
],
108+
)
109+
100110
test_suite(
101111
name = "tasks_tests",
102112
tests = [
@@ -109,5 +119,6 @@ test_suite(
109119
":KotlinBuilderJvmJdepsTest",
110120
":KotlinBuilderJvmKaptTest",
111121
":KotlinBuilderJvmStrictDepsTest",
122+
":KotlinJvmTaskExecutorTest",
112123
],
113124
)

src/test/kotlin/io/bazel/kotlin/builder/tasks/jvm/KotlinJvmTaskExecutorTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ class KotlinJvmTaskExecutorTest {
4444

4545
assertTrue(expandedCompileTask.hasInputs())
4646
assertNotNull(expandedCompileTask.inputs.javaSourcesList.find { path ->
47-
path.endsWith("a_test_1/generated_sources/AnotherGenClass.java")
47+
path.endsWith("generated_sources/AnotherGenClass.java")
4848
})
4949
assertEquals(expandedCompileTask.inputs.javaSourcesCount, 1)
5050
assertNotNull(expandedCompileTask.inputs.kotlinSourcesList.find { path ->
51-
path.endsWith("a_test_1/generated_sources/AGenClass.kt")
51+
path.endsWith("generated_sources/AGenClass.kt")
5252
})
5353
assertEquals(expandedCompileTask.inputs.kotlinSourcesCount, 1)
5454
}

0 commit comments

Comments
 (0)