Build: upgrade language to 1.3 in cli, compiler plugins and Gradle plugin

The language/API version restriction here is to make sure the code works
with Gradle of earlier versions, but all versions of Gradle that we
support already depend on Kotlin 1.3+.
This commit is contained in:
Alexander Udalov
2020-09-20 17:01:02 +02:00
committed by Alexander Udalov
parent 5755c32c84
commit f273edeb8e
7 changed files with 26 additions and 27 deletions
+3 -3
View File
@@ -55,9 +55,9 @@ sourceSets {
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> { tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
kotlinOptions { kotlinOptions {
languageVersion = "1.2" languageVersion = "1.3"
apiVersion = "1.2" apiVersion = "1.3"
freeCompilerArgs += "-Xskip-metadata-version-check" freeCompilerArgs += "-Xskip-prerelease-check"
} }
} }
+4 -4
View File
@@ -24,9 +24,9 @@ dependencies {
} }
tasks.withType(project.compileKotlin.class) { tasks.withType(project.compileKotlin.class) {
kotlinOptions.languageVersion = "1.2" kotlinOptions.languageVersion = "1.3"
kotlinOptions.apiVersion = "1.2" kotlinOptions.apiVersion = "1.3"
kotlinOptions.freeCompilerArgs += ["-Xskip-metadata-version-check"] kotlinOptions.freeCompilerArgs += ["-Xskip-prerelease-check"]
} }
jar { jar {
@@ -52,4 +52,4 @@ pluginBundle {
configurePluginMarkers(project) configurePluginMarkers(project)
test.executable = "${JDK_18}/bin/java" test.executable = "${JDK_18}/bin/java"
@@ -23,12 +23,12 @@ pill {
tasks { tasks {
withType<KotlinCompile> { withType<KotlinCompile> {
kotlinOptions.languageVersion = "1.2" kotlinOptions.languageVersion = "1.3"
kotlinOptions.apiVersion = "1.2" kotlinOptions.apiVersion = "1.3"
kotlinOptions.freeCompilerArgs += listOf("-Xskip-metadata-version-check") kotlinOptions.freeCompilerArgs += listOf("-Xskip-prerelease-check")
} }
named<Jar>("jar") { named<Jar>("jar") {
callGroovy("manifestAttributes", manifest, project) callGroovy("manifestAttributes", manifest, project)
} }
} }
@@ -20,12 +20,12 @@ pill {
tasks { tasks {
withType<KotlinCompile> { withType<KotlinCompile> {
kotlinOptions.languageVersion = "1.2" kotlinOptions.languageVersion = "1.3"
kotlinOptions.apiVersion = "1.2" kotlinOptions.apiVersion = "1.3"
kotlinOptions.freeCompilerArgs += listOf("-Xskip-metadata-version-check") kotlinOptions.freeCompilerArgs += listOf("-Xskip-prerelease-check")
} }
named<Jar>("jar") { named<Jar>("jar") {
callGroovy("manifestAttributes", manifest, project) callGroovy("manifestAttributes", manifest, project)
} }
} }
@@ -1,4 +1,3 @@
import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.pill.PillExtension import org.jetbrains.kotlin.pill.PillExtension
@@ -113,9 +112,9 @@ runtimeJar(rewriteDefaultJarDepsToShadedCompiler()).configure {
tasks { tasks {
withType<KotlinCompile> { withType<KotlinCompile> {
kotlinOptions.jdkHome = rootProject.extra["JDK_18"] as String kotlinOptions.jdkHome = rootProject.extra["JDK_18"] as String
kotlinOptions.languageVersion = "1.2" kotlinOptions.languageVersion = "1.3"
kotlinOptions.apiVersion = "1.2" kotlinOptions.apiVersion = "1.3"
kotlinOptions.freeCompilerArgs += listOf("-Xskip-metadata-version-check") kotlinOptions.freeCompilerArgs += listOf("-Xskip-prerelease-check")
} }
named<ProcessResources>("processResources") { named<ProcessResources>("processResources") {
+4 -4
View File
@@ -30,9 +30,9 @@ dependencies {
} }
tasks.withType(project.compileKotlin.class) { tasks.withType(project.compileKotlin.class) {
kotlinOptions.languageVersion = "1.2" kotlinOptions.languageVersion = "1.3"
kotlinOptions.apiVersion = "1.2" kotlinOptions.apiVersion = "1.3"
kotlinOptions.freeCompilerArgs += ["-Xskip-metadata-version-check"] kotlinOptions.freeCompilerArgs += ["-Xskip-prerelease-check"]
} }
jar { jar {
@@ -58,4 +58,4 @@ pluginBundle {
configurePluginMarkers(project) configurePluginMarkers(project)
test.executable = "${JDK_18}/bin/java" test.executable = "${JDK_18}/bin/java"
@@ -30,9 +30,9 @@ dependencies {
} }
tasks.withType(project.compileKotlin.class) { tasks.withType(project.compileKotlin.class) {
kotlinOptions.languageVersion = "1.2" kotlinOptions.languageVersion = "1.3"
kotlinOptions.apiVersion = "1.2" kotlinOptions.apiVersion = "1.3"
kotlinOptions.freeCompilerArgs += ["-Xskip-metadata-version-check"] kotlinOptions.freeCompilerArgs += ["-Xskip-prerelease-check"]
} }
jar { jar {
@@ -43,4 +43,4 @@ ArtifactsKt.runtimeJar(project, EmbeddableKt.rewriteDefaultJarDepsToShadedCompil
configureSourcesJar() configureSourcesJar()
configureJavadocJar() configureJavadocJar()
test.executable = "${JDK_18}/bin/java" test.executable = "${JDK_18}/bin/java"