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:
@@ -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] ->
|
||||
|
||||
Reference in New Issue
Block a user