Build: pass -Xexpect-actual-classes to some libraries compile tasks

To suppress the warning introduced in KT-61573.
This commit is contained in:
Alexander Udalov
2023-09-11 15:52:36 +02:00
committed by Space Team
parent d9da3973bb
commit 909f32ed54
5 changed files with 13 additions and 5 deletions
@@ -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 {
+2 -1
View File
@@ -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"
)
}
+2 -1
View File
@@ -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"
+3 -1
View File
@@ -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 {
+2 -1
View File
@@ -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)
}
}
}