Skip to content

Commit c57cf32

Browse files
authored
Enable '-Xjvm-default=disable' explicitly to prevent API dump changes (#210)
The default mode is changing from 'disable' to 'enable' in KT-71768. However, core libraries will migrate to the new '-jvm-default=enable' mode explicitly, once they update to Kotlin 2.2, see KT-72051.
1 parent 592f05f commit c57cf32

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
2+
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile
23
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
34

45
buildscript {
@@ -54,10 +55,14 @@ allprojects {
5455
compilerOptions {
5556
freeCompilerArgs.add("-Xwasm-enable-array-range-checks")
5657
}
58+
} else if (this is KotlinJvmCompile) {
59+
compilerOptions {
60+
freeCompilerArgs.add("-Xjvm-default=disable")
61+
}
5762
}
5863
}
5964
}
6065

6166
tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
6267
args.add("--ignore-engines")
63-
}
68+
}

0 commit comments

Comments
 (0)