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:
Alexander Udalov
2021-07-25 19:15:19 +02:00
parent 707e1c7f8d
commit 91c39ed01c
25 changed files with 20 additions and 87 deletions
-19
View File
@@ -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 {
+1 -1
View File
@@ -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"
)
}
}
-6
View File
@@ -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"
}
}
}
-6
View File
@@ -74,12 +74,6 @@ dependencies {
testApiJUnit5()
}
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
kotlinOptions {
freeCompilerArgs += "-Xinline-classes"
}
}
sourceSets {
"main" { }
"test" { projectDefault() }