diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d130f2..6594d13 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ jobs: build: strategy: matrix: - java: [17] + java: [21] os: [ubuntu-latest] runs-on: ${{ matrix.os }} env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1dc95bd..6f08290 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: # Use these Java versions - java: [17] # Current Java LTS & minimum supported by Minecraft + java: [21] # Current Java LTS & minimum supported by Minecraft # and run on both Linux and Windows os: [ubuntu-latest] runs-on: ${{ matrix.os }} diff --git a/build.gradle.kts b/build.gradle.kts index 1ae92a6..30c6365 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -144,16 +144,16 @@ tasks { withType(JavaCompile::class) { options.encoding = "UTF-8" - // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. - options.release.set(17) + // Minecraft 1.20.5 (24w14a) upwards uses Java 21. + options.release.set(21) options.isFork = true options.isIncremental = true } withType(KotlinCompile::class) { kotlinOptions { - // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. - jvmTarget = "17" + // Minecraft 1.20.5 (24w14a) upwards uses Java 21. + jvmTarget = "21" } } @@ -167,8 +167,8 @@ val sourcesJar: Task by tasks val javadocJar: Task by tasks java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // if it is present.