From f34960297cf96128016d0ac77a0cf17a8cd6bcd7 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 1 Sep 2024 20:09:29 +0200 Subject: [PATCH] Update Java compatibility configuration Replaced deprecated `sourceCompatibility` and `targetCompatibility` with the `java.toolchain.languageVersion` property. Added the `options.release` setting in `compileJava` task for better clarity and compatibility. --- build.gradle.kts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d7814a1..07d1095 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,12 +8,15 @@ group = "net.thenextlvl.services" version = "0.1.0" java { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 + toolchain.languageVersion = JavaLanguageVersion.of(21) withSourcesJar() withJavadocJar() } +tasks.compileJava { + options.release.set(21) +} + repositories { mavenCentral() maven("https://repo.thenextlvl.net/releases")