Skip to content

Commit

Permalink
Fix 1.1 - Use Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
Treetrain1 committed Jun 14, 2024
1 parent 1e5a385 commit e877eb5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
strategy:
matrix:
java: [17]
java: [21]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand All @@ -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.
Expand Down

0 comments on commit e877eb5

Please sign in to comment.