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

This reverts commit 3be62dfc
This commit is contained in:
Dmitriy Novozhilov
2021-01-26 17:17:03 +03:00
parent f3364ec602
commit 1300ec3e45
5 changed files with 2 additions and 58 deletions
-34
View File
@@ -320,25 +320,6 @@ extra["compilerModulesForJps"] = listOf(
":compiler:compiler.version"
)
// TODO: fix remaining warnings and remove this property.
extra["tasksWithWarnings"] = listOf(
":kotlin-stdlib:compileTestKotlin",
":kotlin-stdlib-jdk7:compileTestKotlin",
":kotlin-stdlib-jdk8:compileTestKotlin",
":compiler:cli:compileKotlin",
":compiler:frontend:compileKotlin",
":compiler:fir:tree:compileKotlin",
":compiler:fir:resolve:compileKotlin",
":compiler:fir:checkers:compileKotlin",
":compiler:fir:java:compileKotlin",
":kotlin-scripting-compiler:compileKotlin",
":plugins:uast-kotlin:compileKotlin",
":plugins:uast-kotlin:compileTestKotlin",
":plugins:uast-kotlin-idea:compileKotlin"
)
val tasksWithWarnings: List<String> by extra
val coreLibProjects = listOfNotNull(
":kotlin-stdlib",
":kotlin-stdlib-common",
@@ -472,21 +453,6 @@ allprojects {
}
}
if (!kotlinBuildProperties.isInJpsBuildIdeaSync && !kotlinBuildProperties.useFir) {
// For compiler and stdlib, allWarningsAsErrors is configured in the corresponding "root" projects
// (compiler/build.gradle.kts and libraries/commonConfiguration.gradle).
val projectsWithWarningsAsErrors = listOf("core", "plugins").map { File(it).absoluteFile }
if (projectsWithWarningsAsErrors.any(projectDir::startsWith)) {
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile> {
if (path !in tasksWithWarnings) {
kotlinOptions {
allWarningsAsErrors = true
}
}
}
}
}
tasks.withType(VerificationTask::class.java as Class<Task>) {
(this as VerificationTask).ignoreFailures = ignoreTestFailures
}
-12
View File
@@ -10,8 +10,6 @@ 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
@@ -87,16 +85,6 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
idea {
this.module.generatedSourceDirs.add(generationRoot)
}
} else {
allprojects {
tasks.withType<KotlinCompile<*>> {
if (path !in tasksWithWarnings) {
kotlinOptions {
allWarningsAsErrors = true
}
}
}
}
}
projectTest(parallel = true) {
+1 -1
View File
@@ -57,7 +57,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
kotlinOptions {
languageVersion = "1.3"
apiVersion = "1.3"
freeCompilerArgs = freeCompilerArgs - "-progressive" + "-Xskip-prerelease-check"
freeCompilerArgs += "-Xskip-prerelease-check"
}
}
-10
View File
@@ -9,8 +9,6 @@ ext.configureJavaOnlyJvm6Project = { Project project ->
}
}
List<String> tasksWithWarnings = (List<String>) rootProject.ext.get("tasksWithWarnings")
ext.configureJvm6Project = { Project project ->
project.configure(project) {
configurations {
@@ -36,14 +34,6 @@ 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] ->
@@ -47,7 +47,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
kotlinOptions {
languageVersion = "1.3"
apiVersion = "1.3"
freeCompilerArgs = freeCompilerArgs - "-progressive" + "-Xskip-metadata-version-check"
freeCompilerArgs += "-Xskip-metadata-version-check"
}
}