Build with loom-back-compat and a Java toolchain per version
Prepares the build for 26.x, which ships unobfuscated and needs Java 25 (#39): - loom-back-compat applies the remapping Loom to 1.21.x and would apply the plain one to 26.x. loom_version becomes loomx.loom_version. - Each version compiles with its Java toolchain (21 for 1.21.x, 25 for 26.x), and the mixin configs take their compatibility level from it. The foojay resolver downloads a missing JDK; CI installs 21 and 25. - buildAll collects remapJar's output, or jar's where there's nothing to remap. - fabric.mod.json depends on fabric-api, Fabric API's mod id; 26.x's jar no longer provides the old "fabric" alias. Nothing changes for the 1.21.x jars. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -47,11 +47,15 @@ jobs:
|
||||
# The JDK comes from the runner's tool cache. `cache: gradle` stores Gradle's
|
||||
# dependencies, Loom's Minecraft cache and the build cache in the runner's
|
||||
# actions cache.
|
||||
- name: Set up Java 21
|
||||
# 1.21.x builds with Java 21 and 26.x with Java 25. The last version listed is the default
|
||||
# (Gradle runs on it), and the Gradle commands below point toolchain detection at both.
|
||||
- name: Set up Java 25 and 21
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
java-version: |
|
||||
25
|
||||
21
|
||||
cache: gradle
|
||||
|
||||
- name: Build all versions
|
||||
@@ -59,7 +63,8 @@ jobs:
|
||||
chmod +x gradlew
|
||||
# buildAll remaps every Minecraft version (two at a time, to stay within the
|
||||
# Gradle heap) into build/allJars.
|
||||
./gradlew buildAll --no-daemon --stacktrace
|
||||
./gradlew buildAll --no-daemon --stacktrace \
|
||||
-Porg.gradle.java.installations.fromEnv=JAVA_HOME_21_X64,JAVA_HOME_25_X64
|
||||
|
||||
- name: Upload jars to the release
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user