Skip to content

Commit 43adf1a

Browse files
authored
Enable '-Xjvm-default=disable' explicitly to prevent API dump changes (#499)
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 72681c2 commit 43adf1a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ allprojects {
2929
// outputs the compiler version to logs so we can check whether the train configuration applied
3030
kotlinOptions.freeCompilerArgs += "-version"
3131
}
32+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>().configureEach {
33+
compilerOptions { freeCompilerArgs.add("-Xjvm-default=disable") }
34+
}
3235
tasks.withType<org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile>().configureEach {
3336
compilerOptions { freeCompilerArgs.add("-Xpartial-linkage-loglevel=ERROR") }
3437
}

0 commit comments

Comments
 (0)