Skip to content

Commit

Permalink
Update to Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
Aizistral committed May 3, 2024
1 parent 93431de commit 1c3a7cd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
java: [ 17 ]
java: [ 21 ]
os: [ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Build the mod
run: ./gradlew build
- name: Upload build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts from one OS and required JDK.
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts from one OS and required JDK.
uses: actions/upload-artifact@v3
with:
name: Artifacts
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
id "com.matthewprenger.cursegradle" version "1.+"
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

archivesBaseName = project.archives_base_name
version = project.mod_version
Expand Down Expand Up @@ -112,7 +112,7 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 17
it.options.release = 21
}

java {
Expand Down Expand Up @@ -152,7 +152,7 @@ curseforge {
addGameVersion project.minecraft_version
addGameVersion 'Quilt'
addGameVersion 'Fabric'
addGameVersion 'Java 17'
addGameVersion 'Java 21'

relations {
requiredDependency 'fabric-api'
Expand Down
4 changes: 2 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ group = "${maven_group}"
archivesBaseName = "${archives_base_name}"

println("Specifying Java compatibility...")
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.toolchain.languageVersion = JavaLanguageVersion.of(21)

println("Java Installation Data:")
println(" - Java Version: " + System.getProperty('java.version'))
Expand Down Expand Up @@ -193,7 +193,7 @@ curseforge {
changelog = rootProject.file('docs/CHANGELOG.md')

addGameVersion project.minecraft_version
addGameVersion "Java 17"
addGameVersion "Java 21"
addGameVersion "Forge"

//addArtifact(sourcesJar)
Expand Down
4 changes: 2 additions & 2 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ group = "${maven_group}"
archivesBaseName = "${archives_base_name}"

println("Specifying Java compatibility...")
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.toolchain.languageVersion = JavaLanguageVersion.of(21)

println("Java Installation Data:")
println(" - Java Version: " + System.getProperty('java.version'))
Expand Down Expand Up @@ -163,7 +163,7 @@ curseforge {
changelog = rootProject.file('docs/CHANGELOG.md')

addGameVersion project.minecraft_version
addGameVersion "Java 17"
addGameVersion "Java 21"
addGameVersion "NeoForge"

//addArtifact(sourcesJar)
Expand Down

0 comments on commit 1c3a7cd

Please sign in to comment.