Revert "Build: enable -Werror in stdlib/core/compiler/plugins modules"
This reverts commit 3be62dfc
This commit is contained in:
@@ -320,25 +320,6 @@ extra["compilerModulesForJps"] = listOf(
|
|||||||
":compiler:compiler.version"
|
":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(
|
val coreLibProjects = listOfNotNull(
|
||||||
":kotlin-stdlib",
|
":kotlin-stdlib",
|
||||||
":kotlin-stdlib-common",
|
":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>) {
|
tasks.withType(VerificationTask::class.java as Class<Task>) {
|
||||||
(this as VerificationTask).ignoreFailures = ignoreTestFailures
|
(this as VerificationTask).ignoreFailures = ignoreTestFailures
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ plugins {
|
|||||||
val compilerModules: Array<String> by rootProject.extra
|
val compilerModules: Array<String> by rootProject.extra
|
||||||
val otherCompilerModules = compilerModules.filter { it != path }
|
val otherCompilerModules = compilerModules.filter { it != path }
|
||||||
|
|
||||||
val tasksWithWarnings: List<String> by rootProject.extra
|
|
||||||
|
|
||||||
val effectSystemEnabled: Boolean by rootProject.extra
|
val effectSystemEnabled: Boolean by rootProject.extra
|
||||||
val newInferenceEnabled: Boolean by rootProject.extra
|
val newInferenceEnabled: Boolean by rootProject.extra
|
||||||
|
|
||||||
@@ -87,16 +85,6 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|||||||
idea {
|
idea {
|
||||||
this.module.generatedSourceDirs.add(generationRoot)
|
this.module.generatedSourceDirs.add(generationRoot)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
allprojects {
|
|
||||||
tasks.withType<KotlinCompile<*>> {
|
|
||||||
if (path !in tasksWithWarnings) {
|
|
||||||
kotlinOptions {
|
|
||||||
allWarningsAsErrors = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTest(parallel = true) {
|
projectTest(parallel = true) {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
languageVersion = "1.3"
|
languageVersion = "1.3"
|
||||||
apiVersion = "1.3"
|
apiVersion = "1.3"
|
||||||
freeCompilerArgs = freeCompilerArgs - "-progressive" + "-Xskip-prerelease-check"
|
freeCompilerArgs += "-Xskip-prerelease-check"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ ext.configureJavaOnlyJvm6Project = { Project project ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> tasksWithWarnings = (List<String>) rootProject.ext.get("tasksWithWarnings")
|
|
||||||
|
|
||||||
ext.configureJvm6Project = { Project project ->
|
ext.configureJvm6Project = { Project project ->
|
||||||
project.configure(project) {
|
project.configure(project) {
|
||||||
configurations {
|
configurations {
|
||||||
@@ -36,14 +34,6 @@ ext.configureJvm6Project = { Project project ->
|
|||||||
executable = "$JDK_16/bin/java"
|
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] ->
|
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 {
|
kotlinOptions {
|
||||||
languageVersion = "1.3"
|
languageVersion = "1.3"
|
||||||
apiVersion = "1.3"
|
apiVersion = "1.3"
|
||||||
freeCompilerArgs = freeCompilerArgs - "-progressive" + "-Xskip-metadata-version-check"
|
freeCompilerArgs += "-Xskip-metadata-version-check"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user