diff --git a/game/build.gradle.kts b/game/build.gradle.kts index 4df6502..0685895 100644 --- a/game/build.gradle.kts +++ b/game/build.gradle.kts @@ -1,4 +1,5 @@ import org.apache.tools.ant.taskdefs.condition.Os +import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType repositories { @@ -10,9 +11,9 @@ plugins { } kotlin { - tasks.withType { jvmArgs("--enable-preview", "--enable-native-access=ALL-UNNAMED") } + tasks.withType { jvmArgs("--enable-native-access=ALL-UNNAMED") } jvm { - compilations.all { kotlinOptions.jvmTarget = "21" } + compilerOptions { jvmTarget = JvmTarget.JVM_22 } compilations { val main by getting @@ -83,7 +84,7 @@ kotlin { this.attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) - compilations.all { kotlinOptions.sourceMap = true } + compilerOptions { sourceMap = true } } sourceSets { diff --git a/game/src/commonMain/kotlin/com/game/template/Game.kt b/game/src/commonMain/kotlin/com/game/template/Game.kt index fd12796..67f3a3f 100644 --- a/game/src/commonMain/kotlin/com/game/template/Game.kt +++ b/game/src/commonMain/kotlin/com/game/template/Game.kt @@ -92,6 +92,7 @@ class Game(context: Context) : ContextListener(context) { shapeRenderer.filledRectangle(-50f, 50f, 100f, 50f, rotation, color = Color.RED) } renderPassEncoder.end() + renderPassEncoder.release() rotationTimer += dt if (rotationTimer > 10.milliseconds) { @@ -105,7 +106,6 @@ class Game(context: Context) : ContextListener(context) { graphics.surface.present() commandBuffer.release() - renderPassEncoder.release() commandEncoder.release() frame.release() swapChainTexture.release() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4e1b77f..e134b7d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ kotlin = "2.1.0" kotlinx-html = "0.11.0" kotlinx-coroutines = "1.9.0" -littlekt = "0.10.2" +littlekt = "0.11.0" [libraries] kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a595206..81aa1c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists