diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d4bd96..7d60c742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ _See also: [the official libGDX changelog](https://github.com/libgdx/libgdx/blob #### 1.12.1-SNAPSHOT +- **[UPDATE]** Updated to Kotlin 2.0.20. + #### 1.12.1-rc2 - **[UPDATE]** Updated to Kotlin 1.9.25. diff --git a/README.md b/README.md index 2cbe39ae..b6d8f6ea 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![GitHub Build](https://github.com/libktx/ktx/workflows/build/badge.svg)](https://github.com/libktx/ktx/actions?query=workflow%3Abuild) -[![Kotlin](https://img.shields.io/badge/kotlin-1.9.25-orange.svg)](http://kotlinlang.org/) +[![Kotlin](https://img.shields.io/badge/kotlin-2.0.20-orange.svg)](http://kotlinlang.org/) [![libGDX](https://img.shields.io/badge/libgdx-1.12.1-red.svg)](https://libgdx.com/) [![Maven Central](https://img.shields.io/maven-central/v/io.github.libktx/ktx-async.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.github.libktx%22) diff --git a/build.gradle.kts b/build.gradle.kts index 6cd9b41c..05033e12 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ import ktx.* import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL import org.gradle.api.tasks.testing.logging.TestLogEvent.* +import org.jetbrains.kotlin.gradle.dsl.jvm.JvmTargetValidationMode import org.jetbrains.kotlin.gradle.tasks.KotlinCompile buildscript { @@ -80,6 +81,7 @@ subprojects { jvmTarget = JavaVersion.VERSION_1_8.toString() freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } + jvmTargetValidationMode.set(JvmTargetValidationMode.IGNORE) } val compileTestKotlin: KotlinCompile by tasks compileTestKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString() diff --git a/collections/src/main/kotlin/ktx/collections/maps.kt b/collections/src/main/kotlin/ktx/collections/maps.kt index ce790de1..7079b909 100644 --- a/collections/src/main/kotlin/ktx/collections/maps.kt +++ b/collections/src/main/kotlin/ktx/collections/maps.kt @@ -102,7 +102,7 @@ operator fun GdxMap.set(key: Key, value: Value): Value? */ inline fun GdxMap.iterate(action: (Key, Value, MutableIterator>) -> Unit) { val iterator = this.iterator() - while (iterator.hasNext) { + while (iterator.hasNext()) { val next = iterator.next() action(next.key, next.value, iterator) } diff --git a/gradle.properties b/gradle.properties index ffc34695..4cf05cc4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ libGroup=io.github.libktx -kotlinVersion=1.9.25 +kotlinVersion=2.0.20 dokkaVersion=1.9.20 junitPlatformVersion=1.2.0