Skip to content

Commit

Permalink
Update Kotlin to 1.9.20 (#10059)
Browse files Browse the repository at this point in the history
* Update Kotlin to 1.9.20

* Remove useIR as it's just in test

* ksp 1.9.20-1.0.14
  • Loading branch information
timyates authored Nov 3, 2023
1 parent 1ca4e99 commit 17da29d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 55 deletions.
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -57,9 +57,6 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
/** 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

Expand Down Expand Up @@ -267,7 +264,6 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {

args.jvmTarget = jvmTarget
args.javaParameters = javaParameters
args.useIR = useIR
args.useOldBackend = useOldBackend

if(javaModulePath != null)
Expand Down
4 changes: 2 additions & 2 deletions src/main/docs/guide/introduction/whatsNew.adoc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ To enable retention of parameter name data with Kotlin, set the `javaParameters`
----
compileTestKotlin {
kotlinOptions {
jvmTarget = '17'
javaParameters = true
}
}
Expand Down
43 changes: 6 additions & 37 deletions src/main/docs/guide/languageSupport/kotlin/ksp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
Expand All @@ -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"
Expand Down Expand Up @@ -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<Test> {
useJUnitPlatform()
}
Expand Down
4 changes: 0 additions & 4 deletions test-suite-kotlin-ksp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
4 changes: 0 additions & 4 deletions test-suite-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ configurations.testRuntimeClasspath {
}
}

tasks.named("compileTestKotlin") {
kotlinOptions.jvmTarget = "17"
}

tasks.named("test") {
useJUnitPlatform()
}

0 comments on commit 17da29d

Please sign in to comment.