Build: enable -Werror in stdlib/core/compiler/plugins modules

Exclude modules where there are still warnings in an explicitly declared
variable `tasksWithWarnings`.

Also remove "-progressive" from compiler arguments in modules which are
built with non-latest language version, as the warning about that leads
to an error with -Werror.
This commit is contained in:
Alexander Udalov
2020-11-27 17:44:37 +01:00
parent cc90ff78fd
commit 3be62dfc89
5 changed files with 56 additions and 2 deletions
+12
View File
@@ -10,6 +10,8 @@ plugins {
val compilerModules: Array<String> by rootProject.extra
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
@@ -85,6 +87,16 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
idea {
this.module.generatedSourceDirs.add(generationRoot)
}
} else {
allprojects {
tasks.withType<KotlinCompile<*>> {
if (path !in tasksWithWarnings) {
kotlinOptions {
allWarningsAsErrors = true
}
}
}
}
}
projectTest(parallel = true) {