Build: pass -Xexpect-actual-classes to some libraries compile tasks
To suppress the warning introduced in KT-61573.
This commit is contained in:
committed by
Space Team
parent
d9da3973bb
commit
909f32ed54
@@ -10,7 +10,10 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
||||
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||
kotlinOptions.freeCompilerArgs += [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xexpect-actual-classes",
|
||||
]
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -47,7 +47,8 @@ tasks.withType<KotlinCompile<*>>().configureEach {
|
||||
kotlinOptions.freeCompilerArgs += listOf(
|
||||
"-Xallow-kotlin-package",
|
||||
"-opt-in=kotlin.ExperimentalMultiplatform",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts"
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xexpect-actual-classes"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ compileKotlin2Js {
|
||||
"-Xallow-kotlin-package",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
"-Xforce-deprecated-legacy-compiler-usage"
|
||||
"-Xforce-deprecated-legacy-compiler-usage",
|
||||
"-Xexpect-actual-classes"
|
||||
]
|
||||
kotlinOptions {
|
||||
moduleKind = "umd"
|
||||
|
||||
@@ -79,7 +79,8 @@ kotlin {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = listOf(
|
||||
"-Xallow-kotlin-package",
|
||||
"-module-name", "kotlin-stdlib-common"
|
||||
"-module-name", "kotlin-stdlib-common",
|
||||
"-Xexpect-actual-classes",
|
||||
)
|
||||
}
|
||||
// workaround for compiling legacy MPP metadata, remove when this compilation is not needed anymore
|
||||
@@ -201,6 +202,7 @@ kotlin {
|
||||
freeCompilerArgs += listOf(
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xforce-deprecated-legacy-compiler-usage",
|
||||
"-Xexpect-actual-classes",
|
||||
)
|
||||
}
|
||||
compileTaskProvider.configure {
|
||||
|
||||
@@ -50,6 +50,7 @@ compileKotlinCommon {
|
||||
"-opt-in=kotlin.ExperimentalMultiplatform",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xexpect-actual-classes",
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -116,4 +117,4 @@ publishing {
|
||||
}
|
||||
SbomKt.configureSbom(project, "Main", "kotlin-stdlib-common", ["compileClasspath"], mainPublication)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user