Compile Kotlin project with "-Xjvm-default=compatibility" flag

#KT-29073 Fixed
This commit is contained in:
Andrey Uskov
2019-01-15 17:00:09 +03:00
parent 7da8c41f3f
commit 48d832298b
+2
View File
@@ -324,6 +324,7 @@ allprojects {
val commonCompilerArgs = listOfNotNull(
"-Xallow-kotlin-package",
"-Xread-deserialized-contracts",
"-Xjvm-default=compatibility",
"-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> {
kotlinOptions.jdkHome = javaHome
kotlinOptions.jvmTarget = javaVersion
kotlinOptions.freeCompilerArgs += "-Xjvm-default=compatibility"
}
tasks.withType<Test> {