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
+10
View File
@@ -9,6 +9,8 @@ ext.configureJavaOnlyJvm6Project = { Project project ->
}
}
List<String> tasksWithWarnings = (List<String>) rootProject.ext.get("tasksWithWarnings")
ext.configureJvm6Project = { Project project ->
project.configure(project) {
configurations {
@@ -34,6 +36,14 @@ ext.configureJvm6Project = { Project project ->
executable = "$JDK_16/bin/java"
}
}
project.tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile.class) { task ->
if (!tasksWithWarnings.contains(task.path)) {
task.kotlinOptions {
allWarningsAsErrors = true
}
}
}
}
ext.compileJava9Sources = { Project project, String moduleName, Collection<FileCollection> moduleOutputs = [project.sourceSets.main.output] ->