Skip to content

Commit 019c7a2

Browse files
[KUP] Disable opt-in Kotlin compiler warnings (#318)
* [KUP] Disable opt-in Kotlin compiler warnings It was decided to deprecate and phase out the concept (see KT-77721).
1 parent 59a3dc6 commit 019c7a2

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,7 @@ allprojects {
107107
freeCompilerArgs.addAll("-Xreport-all-warnings", "-Xrender-internal-diagnostic-names")
108108

109109
progressiveMode = true
110-
111-
if (getAllWarningsAsErrorsValue(project)) {
112-
allWarningsAsErrors = true
113-
} else {
114-
freeCompilerArgs.addAll("-Wextra", "-Xuse-fir-experimental-checkers")
115-
}
110+
allWarningsAsErrors = getAllWarningsAsErrorsValue(project)
116111

117112
freeCompilerArgs.addAll(getAdditionalKotlinCompilerOptions(project))
118113
}

integration/src/main/kotlin/kotlinx/benchmark/integration/ProjectBuilder.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ private val kotlin_api_version = System.getProperty("kotlin_api_version")?.let {
4545
"apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.fromVersion('$it')"
4646
}.orEmpty()
4747

48-
private val kotlin_warnings_settings = System.getProperty("kotlin_Werror_override")?.let {
48+
private val kotlin_warnings_settings = System.getProperty("kotlin_Werror_override").let {
4949
when (it) {
50-
"disable" -> "freeCompilerArgs.addAll(\"-Wextra\", \"-Xuse-fir-experimental-checkers\")"
50+
"disable" -> ""
5151
else -> "allWarningsAsErrors = true"
5252
}
53-
} ?: false
53+
}
5454

5555
private val kotlin_additional_cli_options = System.getProperty("kotlin_additional_cli_options")?.let {
5656
val argsList = it.split(' ').map(String::trim).filter(String::isNotBlank)

0 commit comments

Comments
 (0)