Build: remove obsolete compiler arguments
These compiler arguments enable features which are enabled by default in the current Kotlin anyway. The only exception is in :compiler:cli which uses an old language version.
This commit is contained in:
@@ -12,25 +12,6 @@ val otherCompilerModules = compilerModules.filter { it != path }
|
||||
|
||||
val tasksWithWarnings: List<String> by rootProject.extra
|
||||
|
||||
val effectSystemEnabled: Boolean by rootProject.extra
|
||||
val newInferenceEnabled: Boolean by rootProject.extra
|
||||
|
||||
configureFreeCompilerArg(effectSystemEnabled, "-Xeffect-system")
|
||||
configureFreeCompilerArg(newInferenceEnabled, "-Xnew-inference")
|
||||
configureFreeCompilerArg(true, "-Xuse-mixed-named-arguments")
|
||||
|
||||
fun configureFreeCompilerArg(isEnabled: Boolean, compilerArgument: String) {
|
||||
if (isEnabled) {
|
||||
allprojects {
|
||||
tasks.withType<KotlinCompile<*>> {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += listOf(compilerArgument)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val antLauncherJar by configurations.creating
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -60,7 +60,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||
languageVersion = "1.3"
|
||||
apiVersion = "1.3"
|
||||
freeCompilerArgs = freeCompilerArgs - "-progressive" + listOf(
|
||||
"-Xskip-prerelease-check", "-Xsuppress-version-warnings"
|
||||
"-Xskip-prerelease-check", "-Xsuppress-version-warnings", "-Xuse-mixed-named-arguments", "-Xnew-inference"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,12 +50,6 @@ val compileKotlin by tasks
|
||||
|
||||
compileKotlin.dependsOn(generateTree)
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xinline-classes"
|
||||
}
|
||||
}
|
||||
|
||||
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
||||
apply(plugin = "idea")
|
||||
idea {
|
||||
|
||||
@@ -24,7 +24,6 @@ tasks {
|
||||
val compileKotlin by existing(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xopt-in=org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI"
|
||||
freeCompilerArgs += "-Xinline-classes"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,12 +74,6 @@ dependencies {
|
||||
testApiJUnit5()
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xinline-classes"
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { }
|
||||
"test" { projectDefault() }
|
||||
|
||||
Reference in New Issue
Block a user