Stop removing JavaCompile tasks from project.tasks in common modules
When the JavaCompile tasks were removed from a common project, some of the dependencies on them remained. This could lead to an error during dependencies resolution, such as the one in KT-23092. To an even greater confusion, the remaining dependencies anyway led to the task being added to the task graph. Issue #KT-23092 Fixed
This commit is contained in:
+20
@@ -236,4 +236,24 @@ class MultiplatformGradleIT : BaseGradleIT() {
|
||||
assertFileExists(kotlinClassesDir(subproject = "lib") + "META-INF/$moduleName.kotlin_module")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testKt23092() = with(Project("multiplatformProject")) {
|
||||
setupWorkingDir()
|
||||
val successMarker = "Found JavaCompile task:"
|
||||
|
||||
gradleBuildScript("lib").appendText("\n" + """
|
||||
afterEvaluate {
|
||||
println('$successMarker ' + tasks.getByName('compileJava').path)
|
||||
println('$successMarker ' + tasks.getByName('compileTestJava').path)
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
build(":lib:tasks") {
|
||||
assertSuccessful()
|
||||
assertContains("$successMarker :lib:compileJava")
|
||||
assertContains("$successMarker :lib:compileTestJava")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user