Skip to content

Gradle 9, Stonecutter 0.9 and current Loom, without dropping the old targets - #37

Merged
Rongmario merged 4 commits into
masterfrom
toolchain/gradle9-no-regression
Aug 2, 2026
Merged

Gradle 9, Stonecutter 0.9 and current Loom, without dropping the old targets#37
Rongmario merged 4 commits into
masterfrom
toolchain/gradle9-no-regression

Conversation

@Rongmario

Copy link
Copy Markdown
Owner

Supersedes toolchain/gradle9 and toolchain/newer-minecraft. One build still covers 1.14.4 to 26.2 — 90 jars, on Gradle 9.6.1, Stonecutter 0.9.7 and Architectury/Fabric Loom 1.17.

The regression, and why there's no split

Moving the whole build forward broke exactly three targets: Forge 1.14.4, 1.15 and 1.15.1, each failing with Unable to locate obfuscation mapping for @Redirect target.

The cause was on our side, not Loom's. Those three — the only ones that shade their own Mixin — added Mixin as an annotationProcessor by hand. Current Loom defaults to useLegacyMixinAp = false: it rewrites mixin annotations into SRG inside remapJar rather than running the processor, so it passes the processor none of the mapping arguments it used to. The processor then starts up with nothing to map against and rejects every injector.

Dropping those lines fixes all three. Every other target from 1.14.4 up was already building unchanged, so this needs no legacy/modern split and no second Gradle project.

The jars were checked rather than just the exit code: Forge 1.14.4 comes out with its annotations remapped to SRG (func_147116_af), Mixin and asm-util shaded, and the ModLauncher service entries intact.

Changes

  • forge/build.gradle — remove the hand-added Mixin annotation processor for the shaded-Mixin versions.
  • Refmaps — drop loom.mixin.defaultRefmapName and the "refmap" key in forge/src/main/resources/cleancut.mixins.json. Loom writes no refmap now, so both pointed at a file the build never produces.
  • CI.github/targets.json carries the JDK each target's Gradle daemon needs, and both workflows install it per job. Minecraft 26 refuses to set up below Java 25; everything else stays on 21. Without this every 26.x job would have failed, since the runners only installed 21.
  • README — per-loader ceilings, the JDK rule (previously "must be 21, Gradle 8 rejects 25"), and the "Newer Minecraft" section that argued for the split.

Verification

Full matrix built locally on this branch:

Loader Targets Result
Fabric 39 (1.14.4 – 1.21.11) all pass
Forge 32 (1.14.4 – 1.21.11) all pass
NeoForge 19 (1.20.2 – 1.21.9, 26.1 – 26.2) all pass

90 jars, and git status stays clean afterwards.

Remaining gaps, all upstream

  • NeoForge skips 1.21.10 / 1.21.11 — from 21.10 the published artifact no longer carries data/server.lzma where Loom expects it. Picks back up at 26.1.
  • Forge stops at 1.21.11 — Loom NPEs setting Minecraft up on the Forge platform for 26.x. NeoForge 26.x goes through the same Loom and works.
  • Fabric stops at 1.21.11 — 26.x has intermediary but no Yarn, and fabric/src is written in Yarn names.

Follow-ups, not blocking

  • fabric/build.gradle still declares dev.architectury.loom-no-remap next to fabric-loom and carries a '26.2' row, but no Fabric 26 target exists. It's unreachable groundwork that puts both Looms on the same script classpath for all 39 Fabric targets — all of which build, so it's harmless, but it's a keep-or-drop call.
  • toolchain/newer-minecraft and toolchain/gradle9 are both subsumed by this and can be retired.

🤖 Generated with Claude Code

Rongmario and others added 4 commits August 2, 2026 01:25
Fabric and Forge reach 1.21.11, NeoForge 1.21.9. Seven new targets, 86
in all.

Fabric needed Loom 1.13.6 for Yarn's unpick v3, which 1.10.5 rejects
outright. The note in the README claiming that needs Gradle 9 was
wrong: 1.13.6 reads it on Gradle 8, and Loom 1.16 is where the Gradle 9
requirement actually starts. Forge needed nothing beyond the version
rows.

Where the rest of the requested versions stand, all checked rather than
assumed:

  NeoForge 1.21.10+ - its artifact no longer carries data/server.lzma
  where Architectury Loom looks for it, on 1.10 and 1.11 alike. The
  packaging moved out from under Loom, so this needs NeoForge's own
  toolchain rather than a version bump.

  26.1, 26.1.1, 26.1.2, 26.2 - Loom refuses these on Java 21 and Gradle
  8 cannot run on Java 25, so they are a Gradle 9 migration for all
  three loaders at once. Fabric also has no Yarn for 26.x at all, only
  intermediary, and these sources are Yarn-named.

  26.3-snapshot-6 - no Forge or NeoForge build exists yet, so it is
  Fabric-only even after the above.

targets.json is now generated from settings.gradle rather than kept in
step by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
NOT mergeable yet - Forge 1.14.4, 1.15 and 1.15.1 regress. Recorded
here so the finding isn't lost.

The wall in front of 26.x turned out not to be the one the README
described. Minecraft 26 ships unobfuscated: net/minecraft/client/
Minecraft.class is in the jar under that name, Mojang stopped
publishing client_mappings entirely - 26.x version JSONs carry only
client and server where 1.21.11 carries four - and Yarn stopped for the
same reason. Fabric publishes 26.x intermediary as a 0.0.0 stub saying
as much. So mappings aren't missing, they're obsolete, and Loom takes a
different plugin for it: dev.architectury.loom-no-remap.

Toolchain: Gradle 9.6.1, Stonecutter 0.9.7, Loom 1.17.17, Architectury
Loom 1.17.485, on a Java 25 daemon, which 26.x requires. Note the
architectury-loom 1.17 line exists - maven-metadata sorts 1.10.449
last, which is how 1.11 got picked earlier.

Working: NeoForge 26.1, 26.1.1, 26.1.2 and 26.2, once the interact API
change was guarded - 26 merged interactAt into interact. Every 1.x
target still builds except the three below.

Not working:

  Forge 1.14.4, 1.15, 1.15.1 - Loom 1.17 no longer puts ASM on the
  mixin processor's class path, which asm-tree fixes, and then the
  processor can't find SRG mappings for @reDIrect targets. Dropping our
  processor makes the build pass and silently ships a jar whose
  mixins.json points at a refmap that was never generated, so that is
  not a fix. Unsolved.

  Forge 26.x - Loom NPEs setting Minecraft up. NeoForge 26.x is fine,
  so this is the Forge platform rather than 26 itself.

  Fabric 26.x - toolchain is solved and it reaches the compiler, but
  these sources are Yarn-named against a Mojang-named game. Needs a
  second source root, not a config change.

  26.3-snapshot-6 - no Forge or NeoForge build exists, so Fabric-only,
  behind the same source work.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Moving to Gradle 9, Stonecutter 0.9 and current Loom broke exactly three
targets: Forge 1.14.4, 1.15 and 1.15.1, all failing with "Unable to locate
obfuscation mapping for @reDIrect target".

The cause was ours. Those three add Mixin as an annotationProcessor by hand,
and current Loom defaults to useLegacyMixinAp = false - it rewrites mixin
annotations into SRG inside remapJar rather than running the processor, so it
passes the processor no mapping arguments. The processor then starts up with
nothing to map against and rejects every injector.

Dropping those lines fixes all three, and every other target from 1.14.4 up
was already building unchanged. So there is no legacy/modern split to make:
one build still covers 1.14.4 to 26.2.

Also drop the refmap that no longer exists. Loom writes none now, so the
"refmap" key in forge's cleancut.mixins.json and loom.mixin.defaultRefmapName
both pointed at a file the build never produces.

CI picks its JDK per target: Minecraft 26 refuses to set up under anything
below Java 25, the rest stay on 21.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Rongmario
Rongmario merged commit becb490 into master Aug 2, 2026
13 of 91 checks passed
@Rongmario
Rongmario deleted the toolchain/gradle9-no-regression branch August 2, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant