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.apache.tools.ant.taskdefs.condition.Os
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
repositories { repositories {
@ -10,9 +11,9 @@ plugins {
} }
kotlin { kotlin {
tasks.withType<JavaExec> { jvmArgs("--enable-preview", "--enable-native-access=ALL-UNNAMED") } tasks.withType<JavaExec> { jvmArgs("--enable-native-access=ALL-UNNAMED") }
jvm { jvm {
compilations.all { kotlinOptions.jvmTarget = "21" } compilerOptions { jvmTarget = JvmTarget.JVM_22 }
compilations { compilations {
val main by getting val main by getting
@ -83,7 +84,7 @@ kotlin {
this.attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) this.attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.js)
compilations.all { kotlinOptions.sourceMap = true } compilerOptions { sourceMap = true }
} }
sourceSets { sourceSets {

View file

@ -92,6 +92,7 @@ class Game(context: Context) : ContextListener(context) {
shapeRenderer.filledRectangle(-50f, 50f, 100f, 50f, rotation, color = Color.RED) shapeRenderer.filledRectangle(-50f, 50f, 100f, 50f, rotation, color = Color.RED)
} }
renderPassEncoder.end() renderPassEncoder.end()
renderPassEncoder.release()
rotationTimer += dt rotationTimer += dt
if (rotationTimer > 10.milliseconds) { if (rotationTimer > 10.milliseconds) {
@ -105,7 +106,6 @@ class Game(context: Context) : ContextListener(context) {
graphics.surface.present() graphics.surface.present()
commandBuffer.release() commandBuffer.release()
renderPassEncoder.release()
commandEncoder.release() commandEncoder.release()
frame.release() frame.release()
swapChainTexture.release() swapChainTexture.release()

View file

@ -2,7 +2,7 @@
kotlin = "2.1.0" kotlin = "2.1.0"
kotlinx-html = "0.11.0" kotlinx-html = "0.11.0"
kotlinx-coroutines = "1.9.0" kotlinx-coroutines = "1.9.0"
littlekt = "0.10.2" littlekt = "0.11.0"
[libraries] [libraries]
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists