Enable new inference in the compiler
This commit is contained in:
@@ -146,6 +146,7 @@ extra["versions.markdown"] = "0.1.25"
|
||||
val isTeamcityBuild = project.hasProperty("teamcity") || System.getenv("TEAMCITY_VERSION") != null
|
||||
val intellijUltimateEnabled = project.getBooleanProperty("intellijUltimateEnabled") ?: isTeamcityBuild
|
||||
val effectSystemEnabled by extra(project.getBooleanProperty("kotlin.compiler.effectSystemEnabled") ?: false)
|
||||
val newInferenceEnabled by extra(project.getBooleanProperty("kotlin.compiler.newInferenceEnabled") ?: false)
|
||||
|
||||
val intellijSeparateSdks = project.getBooleanProperty("intellijSeparateSdks") ?: false
|
||||
|
||||
|
||||
@@ -14,17 +14,23 @@ val compilerModules: Array<String> by rootProject.extra
|
||||
val otherCompilerModules = compilerModules.filter { it != path }
|
||||
|
||||
val effectSystemEnabled: Boolean by rootProject.extra
|
||||
if (effectSystemEnabled) {
|
||||
allprojects {
|
||||
tasks.withType<KotlinCompile<*>> {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += listOf("-Xeffect-system")
|
||||
val newInferenceEnabled: Boolean by rootProject.extra
|
||||
|
||||
configureFreeCompilerArg(effectSystemEnabled, "-Xeffect-system")
|
||||
configureFreeCompilerArg(newInferenceEnabled, "-Xnew-inference")
|
||||
|
||||
fun configureFreeCompilerArg(isEnabled: Boolean, compilerArgument: String) {
|
||||
if (isEnabled) {
|
||||
allprojects {
|
||||
tasks.withType<KotlinCompile<*>> {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += listOf(compilerArgument)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val depDistProjects = listOf(
|
||||
":kotlin-script-runtime",
|
||||
":kotlin-stdlib",
|
||||
|
||||
@@ -4,6 +4,7 @@ org.gradle.configureondemand=false
|
||||
org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx1600m
|
||||
|
||||
kotlin.compiler.effectSystemEnabled=true
|
||||
kotlin.compiler.newInferenceEnabled=true
|
||||
#maven.repository.mirror=http://repository.jetbrains.com/remote-repos/
|
||||
#bootstrap.kotlin.repo=https://dl.bintray.com/kotlin/kotlin-dev
|
||||
#bootstrap.kotlin.version=1.1.50-dev-1451
|
||||
|
||||
Reference in New Issue
Block a user