build: switch toolchain to MC 26.1.2 (intermediary retired)
Some checks failed
build / build (push) Has been cancelled
Some checks failed
build / build (push) Has been cancelled
- net.fabricmc.fabric-loom 1.16-SNAPSHOT (no remap; MC 26.1+ ships unobfuscated) - gradle.properties: minecraft_version=26.1.2, loader=0.19.2, fabric-api=0.149.0+26.1.2 - Java 25 toolchain - fabric.mod.json: fabricloader>=0.19.0, java>=25 - Drop multi-version build script + matrix CI (single-target now) - Backup of 1.21.6/7/8 working tree preserved on mc-1.21.x branch Source migration to Mojmap names is in progress on follow-up commits; this commit alone will not build until source files are ported. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: build-matrix
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -9,33 +9,15 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- mc: "1.21.6"
|
||||
yarn: "1.21.6+build.1"
|
||||
fabric: "0.120.1+1.21.6"
|
||||
- mc: "1.21.7"
|
||||
yarn: "1.21.7+build.8"
|
||||
fabric: "0.129.0+1.21.7"
|
||||
- mc: "1.21.8"
|
||||
yarn: "1.21.8+build.1"
|
||||
fabric: "0.136.1+1.21.8"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
- name: Build (MC ${{ matrix.mc }})
|
||||
run: |
|
||||
./gradlew --no-daemon \
|
||||
-Pminecraft_version=${{ matrix.mc }} \
|
||||
-Pyarn_mappings=${{ matrix.yarn }} \
|
||||
-Pfabric_version=${{ matrix.fabric }} \
|
||||
build
|
||||
java-version: 25
|
||||
- name: Build (MC 26.1.2)
|
||||
run: ./gradlew --no-daemon build
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: video_player-mc${{ matrix.mc }}
|
||||
name: video_player-mc26.1.2
|
||||
path: build/libs/*.jar
|
||||
|
||||
30
build.gradle
30
build.gradle
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.16.2'
|
||||
id 'net.fabricmc.fabric-loom' version "${loom_version}"
|
||||
id 'maven-publish'
|
||||
id 'java'
|
||||
}
|
||||
@@ -16,11 +16,16 @@ repositories {
|
||||
maven { url = 'https://maven.fabricmc.net/' }
|
||||
}
|
||||
|
||||
loom {
|
||||
// Intentionally empty — MC 26.1+ ships unobfuscated, so the new loom does not remap.
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// No mappings dep — Mojang ships official names since 26.1, intermediary is gone.
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
@@ -28,27 +33,24 @@ processResources {
|
||||
inputs.property "mod_id", project.mod_id
|
||||
inputs.property "minecraft_version", project.minecraft_version
|
||||
|
||||
// Pin the fabric.mod.json's minecraft constraint to the build's exact target — keeps each
|
||||
// multi-version jar from claiming compatibility it doesn't have.
|
||||
def mc = project.minecraft_version
|
||||
def target = "~${mc}"
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version, "mod_id": project.mod_id, "target_minecraft": target
|
||||
expand "version": project.version,
|
||||
"mod_id": project.mod_id,
|
||||
"target_minecraft": "~${project.minecraft_version}"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 21
|
||||
it.options.release = 25
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
sourceCompatibility = JavaVersion.VERSION_25
|
||||
targetCompatibility = JavaVersion.VERSION_25
|
||||
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
languageVersion = JavaLanguageVersion.of(25)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
org.gradle.parallel=true
|
||||
# Config cache disabled — new loom + IntelliJ aren't fully compatible yet
|
||||
org.gradle.configuration-cache=false
|
||||
|
||||
# Mod
|
||||
mod_id=video_player
|
||||
mod_version=0.2.0
|
||||
mod_version=0.3.0
|
||||
maven_group=com.ejclaw.videoplayer
|
||||
archives_base_name=video_player
|
||||
|
||||
# Minecraft / Fabric (1.21.6)
|
||||
minecraft_version=1.21.6
|
||||
yarn_mappings=1.21.6+build.1
|
||||
# Minecraft / Fabric (26.1.2 — single target, intermediary/Yarn retired)
|
||||
minecraft_version=26.1.2
|
||||
loader_version=0.19.2
|
||||
fabric_version=0.120.1+1.21.6
|
||||
loom_version=1.16-SNAPSHOT
|
||||
fabric_version=0.149.0+26.1.2
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build the mod against all supported MC versions and collect jars under build/multiver/.
|
||||
# Uses gradle property overrides so we don't have to maintain three settings.gradle copies.
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
OUT=build/multiver
|
||||
rm -rf "$OUT"
|
||||
mkdir -p "$OUT"
|
||||
|
||||
build_one() {
|
||||
local mc="$1" yarn="$2" fab="$3"
|
||||
echo "==> Building for MC $mc (yarn=$yarn, fabric-api=$fab)"
|
||||
./gradlew --no-daemon \
|
||||
-Pminecraft_version="$mc" \
|
||||
-Pyarn_mappings="$yarn" \
|
||||
-Pfabric_version="$fab" \
|
||||
build
|
||||
# main jar = the one without "-sources"
|
||||
local jar
|
||||
jar=$(ls build/libs/video_player-*.jar | grep -v -- '-sources' | head -1)
|
||||
cp "$jar" "$OUT/video_player-mc${mc}.jar"
|
||||
}
|
||||
|
||||
build_one 1.21.6 1.21.6+build.1 0.120.1+1.21.6
|
||||
build_one 1.21.7 1.21.7+build.8 0.129.0+1.21.7
|
||||
build_one 1.21.8 1.21.8+build.1 0.136.1+1.21.8
|
||||
|
||||
echo
|
||||
echo "All jars:"
|
||||
ls -la "$OUT"
|
||||
@@ -16,9 +16,9 @@
|
||||
"client": [ "com.ejclaw.videoplayer.VideoPlayerClient" ]
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.0",
|
||||
"fabricloader": ">=0.19.0",
|
||||
"fabric-api": "*",
|
||||
"minecraft": "${target_minecraft}",
|
||||
"java": ">=21"
|
||||
"java": ">=25"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user