From 17da29d2e04fc2fa6f8d6b53a00fd62d5372fa45 Mon Sep 17 00:00:00 2001 From: Tim Yates Date: Fri, 3 Nov 2023 15:41:02 +0000 Subject: [PATCH] Update Kotlin to 1.9.20 (#10059) * Update Kotlin to 1.9.20 * Remove useIR as it's just in test * ksp 1.9.20-1.0.14 --- gradle/libs.versions.toml | 4 +- .../test/support/KotlinCompilation.kt | 6 +-- .../docs/guide/introduction/whatsNew.adoc | 4 +- .../kotlin/kotlinretainparamnames.adoc | 1 - .../guide/languageSupport/kotlin/ksp.adoc | 43 +++---------------- test-suite-kotlin-ksp/build.gradle | 4 -- test-suite-kotlin/build.gradle | 4 -- 7 files changed, 11 insertions(+), 55 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d17d0490bc..433369f5e0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -60,7 +60,7 @@ managed-groovy = "4.0.14" managed-jakarta-annotation-api = "2.1.1" managed-jackson = "2.15.3" managed-jackson-databind = "2.15.3" -managed-kotlin = "1.9.10" +managed-kotlin = "1.9.20" managed-kotlin-coroutines = "1.7.3" managed-methvin-directory-watcher = "0.18.0" managed-netty = "4.1.100.Final" @@ -72,7 +72,7 @@ managed-reactive-streams = "1.0.4" managed-reactor = "3.5.11" managed-snakeyaml = "2.0" managed-java-parser-core = "3.25.5" -managed-ksp = "1.9.10-1.0.13" +managed-ksp = "1.9.20-1.0.14" micronaut-docs = "2.0.0" [libraries] diff --git a/inject-kotlin-test/src/main/kotlin/io/micronaut/annotation/processing/test/support/KotlinCompilation.kt b/inject-kotlin-test/src/main/kotlin/io/micronaut/annotation/processing/test/support/KotlinCompilation.kt index 45c1bf20fa..d945ccc1f0 100644 --- a/inject-kotlin-test/src/main/kotlin/io/micronaut/annotation/processing/test/support/KotlinCompilation.kt +++ b/inject-kotlin-test/src/main/kotlin/io/micronaut/annotation/processing/test/support/KotlinCompilation.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 original authors + * Copyright 2017-2023 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,9 +57,6 @@ class KotlinCompilation : AbstractKotlinCompilation() { /** Generate metadata for Java 1.8 reflection on method parameters */ var javaParameters: Boolean = false - /** Use the IR backend */ - var useIR: Boolean = false - /** Use the old JVM backend */ var useOldBackend: Boolean = false @@ -267,7 +264,6 @@ class KotlinCompilation : AbstractKotlinCompilation() { args.jvmTarget = jvmTarget args.javaParameters = javaParameters - args.useIR = useIR args.useOldBackend = useOldBackend if(javaModulePath != null) diff --git a/src/main/docs/guide/introduction/whatsNew.adoc b/src/main/docs/guide/introduction/whatsNew.adoc index 920756b035..bb279cb6a2 100644 --- a/src/main/docs/guide/introduction/whatsNew.adoc +++ b/src/main/docs/guide/introduction/whatsNew.adoc @@ -1,8 +1,8 @@ == 4.2.0 -=== Kotlin base version updated to 1.9.10 +=== Kotlin base version updated to 1.9.20 -Kotlin has been updated to 1.9.10, which may cause issues when compiling or linking to Kotlin libraries. +Kotlin has been updated to 1.9.20, which may cause issues when compiling or linking to Kotlin libraries. == 4.1.0 diff --git a/src/main/docs/guide/languageSupport/kotlin/kotlinretainparamnames.adoc b/src/main/docs/guide/languageSupport/kotlin/kotlinretainparamnames.adoc index ab5b1ad5b9..963f6dea8e 100644 --- a/src/main/docs/guide/languageSupport/kotlin/kotlinretainparamnames.adoc +++ b/src/main/docs/guide/languageSupport/kotlin/kotlinretainparamnames.adoc @@ -7,7 +7,6 @@ To enable retention of parameter name data with Kotlin, set the `javaParameters` ---- compileTestKotlin { kotlinOptions { - jvmTarget = '17' javaParameters = true } } diff --git a/src/main/docs/guide/languageSupport/kotlin/ksp.adoc b/src/main/docs/guide/languageSupport/kotlin/ksp.adoc index 0d5e52dd22..336a75478a 100644 --- a/src/main/docs/guide/languageSupport/kotlin/ksp.adoc +++ b/src/main/docs/guide/languageSupport/kotlin/ksp.adoc @@ -10,9 +10,9 @@ If you use the https://micronaut-projects.github.io/micronaut-gradle-plugin/late .build.gradle.kts ---- plugins { - id("org.jetbrains.kotlin.jvm") version "1.9.10" - id("com.google.devtools.ksp") version "1.9.10-1.0.13" - id("org.jetbrains.kotlin.plugin.allopen") version "1.9.10" + id("org.jetbrains.kotlin.jvm") version "1.9.20" + id("com.google.devtools.ksp") version "1.9.20-1.0.13" + id("org.jetbrains.kotlin.plugin.allopen") version "1.9.20" id("io.micronaut.application") version "4.0.0" } version = "0.1" @@ -29,22 +29,6 @@ dependencies { application { mainClass.set("example.micronaut.Application") } -java { - sourceCompatibility = JavaVersion.toVersion("17") - targetCompatibility = JavaVersion.toVersion("17") -} -tasks { - compileKotlin { - kotlinOptions { - jvmTarget = "17" - } - } - compileTestKotlin { - kotlinOptions { - jvmTarget = "17" - } - } -} graalvmNative.toolchainDetection.set(false) micronaut { runtime("netty") @@ -61,9 +45,9 @@ If you don't use the https://micronaut-projects.github.io/micronaut-gradle-plugi [source, kotlin] ---- plugins { - id("org.jetbrains.kotlin.jvm") version "1.9.10" - id("com.google.devtools.ksp") version "1.9.10-1.0.13" - id("org.jetbrains.kotlin.plugin.allopen") version "1.9.10" + id("org.jetbrains.kotlin.jvm") version "1.9.20" + id("com.google.devtools.ksp") version "1.9.20-1.0.13" + id("org.jetbrains.kotlin.plugin.allopen") version "1.9.20" application } version = "0.1" @@ -100,22 +84,7 @@ application { mainClass.set("dockerisms.Application") } -java { - sourceCompatibility = JavaVersion.toVersion("17") - targetCompatibility = JavaVersion.toVersion("17") -} - tasks { - compileKotlin { - kotlinOptions { - jvmTarget = "17" - } - } - compileTestKotlin { - kotlinOptions { - jvmTarget = "17" - } - } withType { useJUnitPlatform() } diff --git a/test-suite-kotlin-ksp/build.gradle b/test-suite-kotlin-ksp/build.gradle index 71ba20e436..42f260b6ba 100644 --- a/test-suite-kotlin-ksp/build.gradle +++ b/test-suite-kotlin-ksp/build.gradle @@ -84,10 +84,6 @@ configurations.testRuntimeClasspath { // kotlinDaemonJvmArgs = ["-Xdebug","-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y"] //} -tasks.named("compileTestKotlin") { - kotlinOptions.jvmTarget = "17" -} - tasks.named("test") { useJUnitPlatform() } diff --git a/test-suite-kotlin/build.gradle b/test-suite-kotlin/build.gradle index 1f81f07ecd..28a9bb1d8b 100644 --- a/test-suite-kotlin/build.gradle +++ b/test-suite-kotlin/build.gradle @@ -82,10 +82,6 @@ configurations.testRuntimeClasspath { } } -tasks.named("compileTestKotlin") { - kotlinOptions.jvmTarget = "17" -} - tasks.named("test") { useJUnitPlatform() }