Build compiler with -Xjvm-default=all + @JvmDefaultCompatibility when needed
This commit is contained in:
committed by
Alexander Udalov
parent
61d339e8f2
commit
c168a19a58
@@ -190,6 +190,25 @@ fun Project.configureKotlinCompilationOptions() {
|
||||
if (project.path in projectsWithEnabledContextReceivers) {
|
||||
freeCompilerArgs += "-Xcontext-receivers"
|
||||
}
|
||||
|
||||
//TODO: migrate modules to defaults
|
||||
//TODO: different gradle versions bundle different Kotlin compilers, not all of them support defaults
|
||||
if (!project.path.contains("-gradle") &&
|
||||
!project.path.contains("kotlin-project-model") &&
|
||||
!project.path.contains(":binary-compatibility-validator") &&
|
||||
!project.path.contains("runtime") &&
|
||||
//TODO: tune performance in tree and tree.impl modules
|
||||
!project.path.contains(":compiler:ir.tree") &&
|
||||
//HACK: filter modules with JVM target 1.6
|
||||
//TODO: remove after removing 1.6 target
|
||||
!project.path.startsWith(":core") &&
|
||||
!project.path.startsWith(":kotlin-stdlib") &&
|
||||
!project.path.startsWith(":kotlinx-metadata") &&
|
||||
!project.path.startsWith(":kotlin-scripting") &&
|
||||
!project.path.startsWith(":compiler:tests-common-jvm6")
|
||||
) {
|
||||
freeCompilerArgs += "-Xjvm-default=all"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user