Skip to content

Commit

Permalink
Update Java compatibility configuration
Browse files Browse the repository at this point in the history
Replaced deprecated `sourceCompatibility` and `targetCompatibility` with the `java.toolchain.languageVersion` property. Added the `options.release` setting in `compileJava` task for better clarity and compatibility.
  • Loading branch information
NonSwag committed Sep 1, 2024
1 parent db0a582 commit f349602
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f349602

Please sign in to comment.