Skip to content

Commit

Permalink
1.21 compatibility (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
wMarciano committed Jun 23, 2024
1 parent 18cc75d commit 528ca6c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 26 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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]

Expand All @@ -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/
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
}

Expand Down Expand Up @@ -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 {
Expand Down
12 changes: 7 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 528ca6c

Please sign in to comment.