From eb869874aff9cacdc3c70e144307f88ec41ce270 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 1 Sep 2024 20:12:00 +0200 Subject: [PATCH] Update Java toolchain configuration Refactored Java toolchain settings to use languageVersion property for clarity and added tasks to generate source and Javadoc JARs. Also set the release option for compileJava task to maintain compatibility. --- build.gradle.kts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 46bc1da..93ab58c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,8 +7,13 @@ group = "net.thenextlvl.resolver" version = "1.0.0" java { - targetCompatibility = JavaVersion.VERSION_21 - sourceCompatibility = JavaVersion.VERSION_21 + toolchain.languageVersion = JavaLanguageVersion.of(21) + withSourcesJar() + withJavadocJar() +} + +tasks.compileJava { + options.release.set(21) } repositories {