diff --git a/build.gradle b/build.gradle index ac90b37..11cbc06 100644 --- a/build.gradle +++ b/build.gradle @@ -92,11 +92,19 @@ task buildInfo { } } +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + compileJava { - sourceCompatibility = JavaVersion.toVersion("21") - targetCompatibility = JavaVersion.toVersion("21") - options.compilerArgs += ["-Aproject=${project.name}"] - dependsOn buildInfo + options.release.set(17) +} + +tasks.withType(GroovyCompile).configureEach { + sourceCompatibility = '17' + targetCompatibility = '17' } shadowJar { @@ -123,10 +131,6 @@ graalvmNative { buildArgs.add('-H:+AddAllCharsets') buildArgs.add('-H:EnableURLProtocols=https,http') buildArgs.add('-H:+ReportExceptionStackTraces') - - javaLauncher = javaToolchains.launcherFor { - languageVersion = JavaLanguageVersion.of(17) - } } test { diff --git a/gradle.properties b/gradle.properties index 8830cd7..7db6353 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ micronautVersion=4.7.1 -native.gradle.plugin.version = 0.9.6 +native.gradle.plugin.version = 0.10.4 junit.jupiter.version = 5.8.1 junit.platform.version = 1.8.1