Apply -Xklib-relative-path-base to all KotlinCompile tasks
As absolute paths were also revealed in atomicfu.jar kotlin-stdlib-wasm kotlin-test-wasm Use solution from Alexander Likhachev (avoid accessing buildDir, projectDir in doFirst()) to prevent breaking the configuration cache. Should be removed after fixing KT-50876 KTI-729
This commit is contained in:
@@ -143,12 +143,6 @@ tasks.withType<KotlinCompile<*>>().configureEach {
|
||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi"
|
||||
)
|
||||
|
||||
doFirst {
|
||||
kotlinOptions.freeCompilerArgs += listOfNotNull(
|
||||
"-Xklib-relative-path-base=$buildDir,$projectDir".takeIf { !kotlinBuildProperties.getBoolean("kotlin.build.use.absolute.paths.in.klib") }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
val compileKotlinJs by tasks.existing(KotlinCompile::class) {
|
||||
|
||||
Reference in New Issue
Block a user