Skip to content

Commit

Permalink
Update kotlin to 1.9.10 (#9793)
Browse files Browse the repository at this point in the history
* build: update to Kotlin 1.9.10
* build: update to KSP 1.9.10-1.0.13

https://github.com/JetBrains/kotlin/releases/tag/v1.9.10
  • Loading branch information
sdelamo authored Sep 11, 2023
1 parent d2b172b commit dd8fee0
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
6 changes: 6 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ dependencies {
implementation "org.tomlj:tomlj:1.1.0"
implementation "me.champeau.gradle:japicmp-gradle-plugin:0.4.2"
implementation "org.graalvm.buildtools.native:org.graalvm.buildtools.native.gradle.plugin:0.9.25"

// Kotlin plugins
implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.managed.kotlin.asProvider().get()}"
implementation "org.jetbrains.kotlin:kotlin-allopen:${libs.versions.managed.kotlin.asProvider().get()}"
implementation "org.jetbrains.kotlin:kotlin-noarg:${libs.versions.managed.kotlin.asProvider().get()}"
implementation "com.google.devtools.ksp:symbol-processing-gradle-plugin:${libs.versions.managed.ksp.get()}"
}
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ developers=Graeme Rocher
chromedriverVersion=79.0.3945.36
geckodriverVersion=0.26.0
webdriverBinariesVersion=1.4
kotlinVersion=1.7.20
kotlin.stdlib.default.dependency=false

# For the docs
Expand Down
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.2"
managed-jackson-databind = "2.15.2"
managed-kotlin = "1.8.21"
managed-kotlin = "1.9.10"
managed-kotlin-coroutines = "1.7.3"
managed-methvin-directory-watcher = "0.18.0"
managed-netty = "4.1.97.Final"
Expand All @@ -72,7 +72,7 @@ managed-reactive-streams = "1.0.4"
managed-reactor = "3.5.9"
managed-snakeyaml = "2.0"
managed-java-parser-core = "3.25.5"
managed-ksp = "1.8.21-1.0.11"
managed-ksp = "1.9.10-1.0.13"
micronaut-docs = "2.0.0"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ abstract class AbstractKotlinCompilation<A : CommonCompilerArguments> internal c

internal fun convertKotlinExitCode(code: ExitCode) = when(code) {
ExitCode.OK -> KotlinCompilation.ExitCode.OK
ExitCode.OOM_ERROR,
ExitCode.INTERNAL_ERROR -> KotlinCompilation.ExitCode.INTERNAL_ERROR
ExitCode.COMPILATION_ERROR -> KotlinCompilation.ExitCode.COMPILATION_ERROR
ExitCode.SCRIPT_EXECUTION_ERROR -> KotlinCompilation.ExitCode.SCRIPT_EXECUTION_ERROR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import org.jetbrains.kotlin.com.intellij.psi.PsiTreeChangeListener
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.config.languageVersionSettings
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
import java.io.File
Expand Down Expand Up @@ -176,6 +177,7 @@ private class KspCompileTestingComponentRegistrar(

this.processingOptions.putAll(compilation.kspArgs)

this.languageVersionSettings = configuration.languageVersionSettings
this.incremental = this@KspCompileTestingComponentRegistrar.incremental
this.incrementalLog = this@KspCompileTestingComponentRegistrar.incrementalLog
this.allWarningsAsErrors = this@KspCompileTestingComponentRegistrar.allWarningsAsErrors
Expand Down
2 changes: 1 addition & 1 deletion inject-kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "io.micronaut.build.internal.convention-library"
id "org.jetbrains.kotlin.jvm"
id "com.google.devtools.ksp" version "1.8.22-1.0.11"
id "com.google.devtools.ksp"

}

Expand Down
8 changes: 0 additions & 8 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
pluginManagement {
plugins {
// id 'io.micronaut.application' version getProperty("micronautGradlePluginVersion")
// id 'io.micronaut.library' version getProperty("micronautGradlePluginVersion")
id "org.jetbrains.kotlin.jvm" version getProperty("kotlinVersion")
id "org.jetbrains.kotlin.kapt" version getProperty("kotlinVersion")
id "org.jetbrains.kotlin.plugin.allopen" version getProperty("kotlinVersion")
id "org.jetbrains.kotlin.plugin.jpa" version getProperty("kotlinVersion")
}
repositories {
gradlePluginPortal()
mavenCentral()
Expand Down
7 changes: 7 additions & 0 deletions src/main/docs/guide/introduction/whatsNew.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
== 4.2.0

=== Kotlin base version updated to 1.9.10

Kotlin has been updated to 1.9.10, which may cause issues when compiling or linking to Kotlin libraries.


== 4.1.0

Support for <<beanMappers, Bean Mappers>> and <<introspection, introspection Builders>>.
Expand Down
12 changes: 6 additions & 6 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.8.21"
id("com.google.devtools.ksp") version "1.8.21-1.0.11"
id("org.jetbrains.kotlin.plugin.allopen") version "1.8.21"
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("io.micronaut.application") version "4.0.0"
}
version = "0.1"
Expand Down Expand Up @@ -61,9 +61,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.8.21"
id("com.google.devtools.ksp") version "1.8.21-1.0.11"
id("org.jetbrains.kotlin.plugin.allopen") version "1.8.21"
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"
application
}
version = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion test-suite-kotlin-ksp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "io.micronaut.build.internal.convention-test-library"
id "org.jetbrains.kotlin.jvm"
id("com.google.devtools.ksp") version "1.8.22-1.0.11"
id("com.google.devtools.ksp")
}

micronautBuild {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
package io.micronaut.core.beans

import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertThrows
import org.junit.jupiter.api.Test
import io.micronaut.core.reflect.exception.InstantiationException

class KotlinBeanIntrospectionSpec {

@Test
fun testWithValueOnKotlinDataClassWithDefaultValues() {
val introspection = BeanIntrospection.getIntrospection(SomeEntity::class.java)

assertThrows(InstantiationException::class.java) {
val instance = introspection.instantiate(10L, "foo")
val instance = introspection.instantiate(10L, "foo")

assertEquals(10, instance.id)
assertEquals("foo", instance.something)
assertEquals(10, instance.id)
assertEquals("foo", instance.something)

val changed = introspection.getRequiredProperty("something", String::class.java)
.withValue(instance, "changed")

assertEquals(10, changed.id)
assertEquals("changed", changed.something)
}
val changed = introspection.getRequiredProperty("something", String::class.java)
.withValue(instance, "changed")

assertEquals(10, changed.id)
assertEquals("changed", changed.something)
}

@Test
Expand Down

0 comments on commit dd8fee0

Please sign in to comment.