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