diff --git a/buildSrc/src/main/kotlin/org/openrndr/orsl/convention/kotlin-jvm.gradle.kts b/buildSrc/src/main/kotlin/org/openrndr/orsl/convention/kotlin-jvm.gradle.kts index f915038..12221ff 100644 --- a/buildSrc/src/main/kotlin/org/openrndr/orsl/convention/kotlin-jvm.gradle.kts +++ b/buildSrc/src/main/kotlin/org/openrndr/orsl/convention/kotlin-jvm.gradle.kts @@ -52,9 +52,6 @@ dependencies { "demoRuntimeOnly"(libs.slf4j.simple) } -kotlin { - jvmToolchain(libs.versions.jvmTarget.get().toInt()) -} tasks { @Suppress("UNUSED_VARIABLE") @@ -71,14 +68,19 @@ tasks { } } withType() { + kotlinOptions.jvmTarget = libs.versions.jvmTarget.get() kotlinOptions.apiVersion = libs.versions.kotlinApi.get() kotlinOptions.languageVersion = libs.versions.kotlinLanguage.get() + kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes" + kotlinOptions.freeCompilerArgs += "-Xjdk-release=${libs.versions.jvmTarget.get()}" } } java { withJavadocJar() withSourcesJar() + targetCompatibility = JavaVersion.valueOf("VERSION_${libs.versions.jvmTarget.get()}") + sourceCompatibility = JavaVersion.valueOf("VERSION_${libs.versions.jvmTarget.get()}") } val isReleaseVersion = !(version.toString()).endsWith("SNAPSHOT") diff --git a/buildSrc/src/main/kotlin/org/openrndr/orsl/convention/kotlin-multiplatform.gradle.kts b/buildSrc/src/main/kotlin/org/openrndr/orsl/convention/kotlin-multiplatform.gradle.kts index eb992f9..0801638 100644 --- a/buildSrc/src/main/kotlin/org/openrndr/orsl/convention/kotlin-multiplatform.gradle.kts +++ b/buildSrc/src/main/kotlin/org/openrndr/orsl/convention/kotlin-multiplatform.gradle.kts @@ -3,8 +3,10 @@ package org.openrndr.orsl.convention import CollectScreenshotsTask import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.tasks.testing.logging.TestExceptionFormat -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import java.net.URI +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinCompile +import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile val libs = the() @@ -27,14 +29,17 @@ repositories { group = "org.openrndr.extra" -tasks.withType() { +tasks.withType> { kotlinOptions.apiVersion = libs.versions.kotlinApi.get() kotlinOptions.languageVersion = libs.versions.kotlinLanguage.get() + kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes" + kotlinOptions.freeCompilerArgs += "-Xjdk-release=${libs.versions.jvmTarget.get()}" +} +tasks.withType().configureEach { + compilerOptions.jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get())) } - kotlin { jvm { - jvmToolchain(libs.versions.jvmTarget.get().toInt()) compilations { val main by getting diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 64209e3..6e3f811 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] ksp = "1.9.23-1.0.19" -kotlinPoet = "1.15.3" +kotlinPoet = "1.16.0" kotlinApi = "1.9" kotlinLanguage = "1.9" kotlin = "1.9.23" @@ -9,10 +9,10 @@ openrndr = { require = "[0.4.2, 0.5.0)" } orx = { require = "[0.4.2, 0.5.0)" } kotlinxCoroutines = "1.8.0" kotlinLogging = "6.0.3" -kotlinxSerialization = "1.6.3" +kotlinxSerialization = "1.6.4" dokka = "1.7.10" nebulaRelease = "18.0.7" -gradleNexusPublish = "2.0.0-rc-1" +gradleNexusPublish = "2.0.0" kluent = "1.73" junitJupiter = "5.10.1" slf4j = "2.0.12" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22c..b82aa23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/orsl-demos/build.gradle.kts b/orsl-demos/build.gradle.kts index b812c55..c807587 100644 --- a/orsl-demos/build.gradle.kts +++ b/orsl-demos/build.gradle.kts @@ -17,6 +17,5 @@ dependencies { implementation(libs.orx.camera) implementation(libs.orx.mesh.generators) implementation(libs.orx.olive) - testImplementation(libs.kluent) } \ No newline at end of file diff --git a/orsl-shader-generator/build.gradle.kts b/orsl-shader-generator/build.gradle.kts index 65624aa..2724ad2 100644 --- a/orsl-shader-generator/build.gradle.kts +++ b/orsl-shader-generator/build.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinCompile plugins { org.openrndr.orsl.convention.`kotlin-multiplatform` - id("com.google.devtools.ksp") version "1.9.22-1.0.16" + id("com.google.devtools.ksp") version "1.9.23-1.0.19" }