Add -Xsuppress-deprecated-jvm-target-warning to modules compiled with 1.6
Currently this leads to an unknown argument warning, but it'll be removed automatically on the next bootstrap.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
@@ -17,3 +16,9 @@ sourceSets {
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,3 +19,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,3 +21,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,3 +25,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,11 @@ val compileJava by tasks.getting(JavaCompile::class) {
|
||||
}
|
||||
|
||||
val compileKotlin by tasks.getting(KotlinCompile::class) {
|
||||
kotlinOptions.jvmTarget = "1.6"
|
||||
kotlinOptions.jdkHome = rootProject.extra["JDK_16"] as String
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.6"
|
||||
jdkHome = rootProject.extra["JDK_16"] as String
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateRuntimeDescriptorTestsKt")
|
||||
@@ -39,4 +42,4 @@ projectTest(parallel = true) {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
testsJar()
|
||||
testsJar()
|
||||
|
||||
@@ -22,3 +22,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,3 +21,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,3 +20,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,3 +23,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,3 +19,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,3 +20,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
plugins {
|
||||
java
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
@@ -21,3 +19,9 @@ tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ ext.configureJvm6Project = { Project project ->
|
||||
if (!tasksWithWarnings.contains(task.path)) {
|
||||
task.kotlinOptions {
|
||||
allWarningsAsErrors = true
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,12 +30,18 @@ configureSourcesJar()
|
||||
configureJavadocJar()
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
}
|
||||
|
||||
configureJvmIrBackend(project)
|
||||
|
||||
@@ -40,12 +40,18 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
}
|
||||
|
||||
configureJvmIrBackend(project)
|
||||
|
||||
@@ -41,13 +41,20 @@ configureSourcesJar()
|
||||
configureJavadocJar()
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts"]
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
kotlinOptions.moduleName = project.archivesBaseName
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
}
|
||||
|
||||
configureJvmIrBackend(project)
|
||||
|
||||
@@ -33,12 +33,18 @@ configureSourcesJar()
|
||||
configureJavadocJar()
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
}
|
||||
|
||||
configureJvmIrBackend(project)
|
||||
|
||||
@@ -47,6 +47,7 @@ compileKotlin {
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-Xno-optimized-callable-references",
|
||||
"-Xno-kotlin-nothing-value-exception",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
"-Xopt-in=kotlin.RequiresOptIn"]
|
||||
moduleName = "kotlin-reflection"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
@@ -21,7 +20,10 @@ sourceSets {
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||
kotlinOptions.freeCompilerArgs += listOf(
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xsuppress-deprecated-jvm-target-warning"
|
||||
)
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
|
||||
@@ -77,6 +77,7 @@ compileKotlin {
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
@@ -90,6 +91,7 @@ compileTestKotlin {
|
||||
"-Xopt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-Xopt-in=kotlin.io.path.ExperimentalPathApi",
|
||||
"-Xcommon-sources=${fileTree('../test').join(',')}",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,8 @@ compileKotlin {
|
||||
"-Xopt-in=kotlin.ExperimentalMultiplatform",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xinline-classes",
|
||||
"-Xuse-14-inline-classes-mangling-scheme"
|
||||
"-Xuse-14-inline-classes-mangling-scheme",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
moduleName = "kotlin-stdlib"
|
||||
}
|
||||
|
||||
@@ -34,8 +34,9 @@ configureJavadocJar()
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = [
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-Xsuppress-deprecated-jvm-target-warning",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
@@ -22,3 +22,9 @@ publish()
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,3 +21,9 @@ publish()
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,10 @@ publish {
|
||||
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
javadocJar()
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user