Build: enable Werror for almost all compileKotlin tasks

The only exception at this point is :kotlin-gradle-plugin:compileKotlin.
This commit is contained in:
Alexander Udalov
2021-07-30 17:55:13 +02:00
parent f2ffead881
commit 0fb398d45e
3 changed files with 6 additions and 33 deletions
-15
View File
@@ -1,4 +1,3 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
import org.jetbrains.kotlin.ideaExt.idea
import java.io.File
@@ -10,8 +9,6 @@ plugins {
val compilerModules: Array<String> by rootProject.extra
val otherCompilerModules = compilerModules.filter { it != path }
val tasksWithWarnings: List<String> by rootProject.extra
val antLauncherJar by configurations.creating
dependencies {
@@ -68,18 +65,6 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
}
}
if (!kotlinBuildProperties.disableWerror) {
allprojects {
tasks.withType<KotlinCompile<*>> {
if (path !in tasksWithWarnings) {
kotlinOptions {
allWarningsAsErrors = true
}
}
}
}
}
projectTest(parallel = true) {
dependsOn(":dist")