Switch to Java 21

This commit is contained in:
AsamK 2023-09-30 22:38:24 +02:00
parent 895740755d
commit 80c1a6d2af
9 changed files with 26 additions and 11 deletions

View file

@ -9,8 +9,12 @@ plugins {
version = "0.12.4"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
application {
@ -25,7 +29,7 @@ graalvmNative {
if (System.getenv("GRAALVM_HOME") == null) {
toolchainDetection.set(true)
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
})
} else {
toolchainDetection.set(false)