Skip to content

Commit

Permalink
Java 21 and Gradle 8.8 (#194)
Browse files Browse the repository at this point in the history
* Build with Java 21 to ensure compatibility

* Update Gradle to 8.8 to support Loom 1.7 and clean up some deprecations in build.gradle
  • Loading branch information
nelind3 authored Sep 7, 2024
1 parent 41b9f92 commit bf0985a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fabric-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 23
java-version: 21
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fabric-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 23
java-version: 21

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javadoc-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 23
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 23
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 23
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ processResources {

tasks.withType(JavaCompile).configureEach {
// One of the big changes to 1.21 is a requirement for at least Java 21, using 22 as it's current at time of dev.
it.options.release = 22
it.options.release = 21
}

java {
Expand All @@ -92,8 +92,8 @@ java {
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_22
targetCompatibility = JavaVersion.VERSION_22
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

jar {
Expand Down Expand Up @@ -135,7 +135,7 @@ curseforge {
addGameVersion "Fabric"
addGameVersion "Quilt"

mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}-fabric.jar")) {
mainArtifact(file("${project.layout.buildDirectory}/libs/${base.archivesName}-${version}-fabric.jar")) {
displayName = "[${project.minecraft_version}] Taterzens ${version}"
}

Expand All @@ -157,7 +157,7 @@ modrinth {
changelog = ENV.CHANGELOG ?: "A changelog can be found at https://github.com/samolego/Taterzens/releases/tag/${version}"
versionName = "[${project.minecraft_version}] Taterzens ${version} [Fabric]"

uploadFile = file("${project.buildDir}/libs/${archivesBaseName}-${version}-fabric.jar")
uploadFile = file("${project.layout.buildDirectory}/libs/${base.archivesName}-${version}-fabric.jar")

gameVersions = ["${project.minecraft_version}"]
loaders = ['fabric', 'quilt']
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit bf0985a

Please sign in to comment.