diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac45f6dc..b844d4be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - java: [ 17 ] + java: [ 21 ] os: [ubuntu-22.04, windows-2022] runs-on: ${{ matrix.os }} steps: @@ -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 diff --git a/build.gradle b/build.gradle index 81093a0f..04a9208b 100644 --- a/build.gradle +++ b/build.gradle @@ -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 @@ -112,7 +112,7 @@ processResources { } tasks.withType(JavaCompile).configureEach { - it.options.release = 17 + it.options.release = 21 } java { @@ -152,7 +152,7 @@ curseforge { addGameVersion project.minecraft_version addGameVersion 'Quilt' addGameVersion 'Fabric' - addGameVersion 'Java 17' + addGameVersion 'Java 21' relations { requiredDependency 'fabric-api' diff --git a/forge/build.gradle b/forge/build.gradle index 18b77b29..de00e82a 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -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')) @@ -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) diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 858bb9e9..21ade9f2 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -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')) @@ -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)