Updated to Java 21

This commit is contained in:
Auxilor 2024-06-24 13:38:56 +01:00
parent 14e2b632e3
commit 21023de5a7
4 changed files with 4 additions and 27 deletions

View File

@ -15,11 +15,11 @@ jobs:
- name: Checkout latest code - name: Checkout latest code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up JDK 17 - name: Set up JDK 21
uses: actions/setup-java@v2 uses: actions/setup-java@v2
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 21
- name: Change wrapper permissions - name: Change wrapper permissions
run: chmod +x ./gradlew run: chmod +x ./gradlew

View File

@ -64,7 +64,7 @@ allprojects {
compileKotlin { compileKotlin {
kotlinOptions { kotlinOptions {
jvmTarget = "17" jvmTarget = "21"
} }
} }
@ -90,7 +90,7 @@ allprojects {
} }
withType<JavaCompile>().configureEach { withType<JavaCompile>().configureEach {
options.release = 17 options.release = 21
} }
} }
@ -101,10 +101,3 @@ allprojects {
} }
} }
} }
// Root is Java 21 to support 1.20.6+, rest use Java 17
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}

View File

@ -13,14 +13,4 @@ tasks {
build { build {
dependsOn(reobfJar) dependsOn(reobfJar)
} }
compileJava {
options.release = 21
}
compileKotlin {
kotlinOptions {
jvmTarget = "21"
}
}
} }

View File

@ -1,6 +0,0 @@
jdk: openjdk17
before_install:
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk update
- sdk install java 17.0.1-tem
- sdk use java 17.0.1-tem