Compile Kotlin project with "-Xjvm-default=compatibility" flag
#KT-29073 Fixed
This commit is contained in:
@@ -324,6 +324,7 @@ allprojects {
|
|||||||
val commonCompilerArgs = listOfNotNull(
|
val commonCompilerArgs = listOfNotNull(
|
||||||
"-Xallow-kotlin-package",
|
"-Xallow-kotlin-package",
|
||||||
"-Xread-deserialized-contracts",
|
"-Xread-deserialized-contracts",
|
||||||
|
"-Xjvm-default=compatibility",
|
||||||
"-Xprogressive".takeIf { hasProperty("test.progressive.mode") } // TODO: change to "-progressive" after bootstrap
|
"-Xprogressive".takeIf { hasProperty("test.progressive.mode") } // TODO: change to "-progressive" after bootstrap
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -750,6 +751,7 @@ fun Project.configureJvmProject(javaHome: String, javaVersion: String) {
|
|||||||
tasks.withType<KotlinCompile> {
|
tasks.withType<KotlinCompile> {
|
||||||
kotlinOptions.jdkHome = javaHome
|
kotlinOptions.jdkHome = javaHome
|
||||||
kotlinOptions.jvmTarget = javaVersion
|
kotlinOptions.jvmTarget = javaVersion
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xjvm-default=compatibility"
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Test> {
|
tasks.withType<Test> {
|
||||||
|
|||||||
Reference in New Issue
Block a user