[MPP] Fix default parameter value for optimistic commonization in KGP

KT-51332
This commit is contained in:
Pavel Kirpichenkov
2022-02-15 16:28:12 +03:00
parent 570da57739
commit 0bf6f1eb83
8 changed files with 38 additions and 1 deletions
@@ -143,6 +143,16 @@ class CommonizerHierarchicalIT : BaseGradleIT() {
}
}
@Test
fun `test KT-51332 optimistic commonization`() {
with(Project("optimisticCommonization")) {
build(":compileCommonMainKotlinMetadata") {
assertNotContains("Unresolved reference")
assertSuccessful()
}
}
}
private object Os {
private val os = OperatingSystem.current()
val canCompileApple get() = os.isMacOsX
@@ -0,0 +1,21 @@
plugins {
kotlin("multiplatform")
}
repositories {
mavenCentral()
mavenLocal()
}
kotlin {
linuxArm32Hfp("intPlatform") {
compilations.get("main").cinterops.create("intPropertyInterop") {
header(file("libs/intPlatform.h"))
}
}
linuxX64("longPlatform") {
compilations.get("main").cinterops.create("intPropertyInterop") {
header(file("libs/longPlatform.h"))
}
}
}
@@ -0,0 +1 @@
kotlin.mpp.enableCInteropCommonization=true
@@ -219,7 +219,7 @@ internal class PropertiesProvider private constructor(private val project: Proje
get() = booleanProperty(KotlinMultiplatformPlugin.STABILITY_NOWARN_FLAG)
val mppEnableOptimisticNumberCommonization: Boolean
get() = booleanProperty(KOTLIN_MPP_ENABLE_OPTIMISTIC_NUMBER_COMMONIZATION) ?: false
get() = booleanProperty(KOTLIN_MPP_ENABLE_OPTIMISTIC_NUMBER_COMMONIZATION) ?: true
val wasmStabilityNoWarn: Boolean
get() = booleanProperty("kotlin.wasm.stability.nowarn") ?: false