update to littlekt 0.11.0 and min JDK 22

This commit is contained in:
LeHaine 2024-12-14 09:32:33 -05:00
parent 5630379cdf
commit 8ef11b3ee3
No known key found for this signature in database
GPG key ID: 8AEC4F9B9F33E9AC
4 changed files with 7 additions and 6 deletions

View file

@ -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<JavaExec> { jvmArgs("--enable-preview", "--enable-native-access=ALL-UNNAMED") }
tasks.withType<JavaExec> { 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 {

View file

@ -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()

View file

@ -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" }

View file

@ -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