Use relative paths in stdlib klib artifacts
Intentionally use doFirst section to trick gradle and not affect inputs with absolute path usage. Old behaviour can be returned by kotlin.build.use.absolute.paths.in.klib in local.properties Should be removed after KT-50876 fix. ^KTI-730 In Progress
This commit is contained in:
committed by
TeamCityServer
parent
b22190ccc1
commit
87bf6e010e
@@ -52,6 +52,12 @@ tasks.withType<KotlinCompile<*>>().configureEach {
|
||||
"-opt-in=kotlin.ExperimentalMultiplatform",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts"
|
||||
)
|
||||
|
||||
doFirst {
|
||||
kotlinOptions.freeCompilerArgs += listOfNotNull(
|
||||
"-Xklib-relative-path-base=$buildDir".takeIf { !kotlinBuildProperties.getBoolean("kotlin.build.use.absolute.paths.in.klib") }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("compileKotlinJs") {
|
||||
|
||||
@@ -143,6 +143,12 @@ tasks.withType<KotlinCompile<*>>().configureEach {
|
||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi"
|
||||
)
|
||||
|
||||
doFirst {
|
||||
kotlinOptions.freeCompilerArgs += listOfNotNull(
|
||||
"-Xklib-relative-path-base=$buildDir".takeIf { !kotlinBuildProperties.getBoolean("kotlin.build.use.absolute.paths.in.klib") }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
val compileKotlinJs by tasks.existing(KotlinCompile::class) {
|
||||
|
||||
Reference in New Issue
Block a user