From 649e8dd5c7bf3749470da144fcff56471d1ea379 Mon Sep 17 00:00:00 2001 From: wMarciano <57303547+wMarciano@users.noreply.github.com> Date: Fri, 21 Jun 2024 19:48:22 -0400 Subject: [PATCH] 1.21 compatibility --- .github/workflows/build.yml | 23 ++++++++--------------- build.gradle | 4 ++-- gradle.properties | 12 +++++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- src/main/resources/fabric.mod.json | 6 +++--- 5 files changed, 21 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ac92eb..cdd3486 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,3 @@ -# Automatically build the project and run any configured tests for every push -# and submitted pull request. This can help catch issues that only occur on -# certain platforms or Java versions, and provides a first line of defence -# against bad commits. - name: build on: [pull_request, push] @@ -12,28 +7,26 @@ jobs: matrix: # Use these Java versions java: [ - 17, # Current Java LTS & minimum supported by Minecraft + 21, # Current Java LTS ] - # and run on both Linux and Windows - os: [ubuntu-20.04, windows-2022] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 steps: - name: checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v2 - name: setup jdk ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} + distribution: 'microsoft' - name: make gradle wrapper executable - if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew - name: build run: ./gradlew build - name: capture build artifacts - if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS - uses: actions/upload-artifact@v3 + if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ diff --git a/build.gradle b/build.gradle index 98d3fca..310588d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.2-SNAPSHOT' + id 'fabric-loom' version '1.7-SNAPSHOT' id 'maven-publish' } @@ -47,7 +47,7 @@ tasks.withType(JavaCompile).configureEach { it.options.encoding = "UTF-8" // Minecraft 1.17 (21w19a) upwards uses Java 16. - it.options.release = 17 + it.options.release = 21 } java { diff --git a/gradle.properties b/gradle.properties index bc905da..5787d0a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,13 +2,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use -minecraft_version=1.20.1 -yarn_mappings=1.20.1+build.8 -loader_version=0.14.21 +minecraft_version=1.21 +yarn_mappings=1.21+build.2 +loader_version=0.15.11 + +# Fabric API # Mod Properties -mod_version=4.2.1+1.20.1 +mod_version=4.2.1+1.21 maven_group=dev.nincodedo archives_base_name=mc-server-description # Dependencies -fabric_version=0.84.0+1.20.1 +fabric_version=0.100.3+1.21 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 59bc51a..0d18421 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index c3c6513..f2831ad 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -26,9 +26,9 @@ }, "depends": { - "fabricloader": ">=0.14.21", + "fabricloader": ">=0.15.11", "fabric": "*", - "minecraft": ">=1.20.1", - "java": ">=17" + "minecraft": ">=1.21", + "java": ">=21" } }