Add the expectedBy dependency to the compile configuration

Enable its propagation through transitive dependencies (including
POMs generated by Gradle)

Issue #KT-22824 Fixed
This commit is contained in:
Sergey Igushkin
2018-02-20 15:35:16 +03:00
parent 3836dcab85
commit 5901c2163f
2 changed files with 25 additions and 0 deletions
@@ -201,4 +201,25 @@ class MultiplatformGradleIT : BaseGradleIT() {
assertTasksExecuted(listOf(":lib:compileKotlinCommon", ":libJvm:compileKotlin", ":libJs:compileKotlin2Js"))
}
}
@Test
fun testCommonModuleAsTransitiveDependency() = with(Project("multiplatformProject")) {
setupWorkingDir()
gradleBuildScript("libJvm").appendText("""
${'\n'}
task printCompileConfiguration(type: DefaultTask) {
doFirst {
configurations.compile.resolvedConfiguration.resolvedArtifacts.each {
println("Dependency: '" + it.name + "'")
}
}
}
""".trimIndent())
build("printCompileConfiguration") {
assertSuccessful()
// Check that `lib` is contained in the resolved compile artifacts of `libJvm`:
assertContains("Dependency: 'lib'")
}
}
}