Skip to content

Backport Wave 0: shared build infrastructure (26.1.2) - #81

Merged
chimericdream merged 7 commits into
26.1.2from
backport/26.1.2/shared-build
Jul 27, 2026
Merged

Backport Wave 0: shared build infrastructure (26.1.2)#81
chimericdream merged 7 commits into
26.1.2from
backport/26.1.2/shared-build

Conversation

@chimericdream

Copy link
Copy Markdown
Owner

Wave 0 of the main26.1.2 backport. Plan: docs/backport-26.1.2/README.md.

This is the first of a stacked series — every later PR is based on this one, so merge in order:

26.1.2 <- shared-build (this PR) <- chimeric-lib <- 14 per-mod PRs

What's here

Commit
.gitattributes Makes LF structural. Normalizes gradlew.bat (blob LF, worktree CRLF).
plan correction See below.
root gradle.properties parallel = true; the five *_compat floors centralized.
root build.gradle chimeric-lib as an in-build project() dep; drops mavenLocal(), the GitHub Packages repo and GITHUB_TOKEN; wires the fabric test source set.
settings.gradle + tpl Hoists chimeric-lib to the front of the include order.
gradle/mod-conventions.gradle Every mod's build.gradle collapses to one apply from: line.
CI + docs JDK 21 → 25 (the build is options.release = 25, so CI literally could not compile); docs/, CODE-REVIEW-PLAN.md, DEPENDENCY-PLAN.md; CLAUDE.md rewritten.

Wave 0 owns every *.gradle and gradle.properties in the repo, so no two later PRs collide on a build file.

Why the settings.gradle hoist

Loom resolves each mod's classpath in that mod's afterEvaluate; a consumer resolving chimeric-lib before it has configured fails with "project components has not been calculated yet". The hoist and evaluationDependsOnChildren() in chimeric-lib/build.gradle are both required — neither works alone.

Coordinates changed, filenames did not

archivesName: <name>-<platform>-26.1.2  ->  <name>-<platform>
version:      5.0.0-alpha.0             ->  26.1.2-5.0.0-alpha.0

The produced jar is byte-identically named, so scripts/create-modpacks.ts needs no change. Verified by running it.

Correction carried in this PR

The plan claimed ~4,000 payload files were CRLF churn. That was wrong — measured with git show <rev>:<path>, which applies eol conversion. Real census via git cat-file blob: 26.1.2 has 1 CRLF file (gradlew.bat), c5f2cc4d 12, main 9. Only 3 payload files mismatch, all in minekea and all already on its conflict list. README.md and minekea.md are corrected here.

Verification

  • ./gradlew clean build — SUCCESSFUL, all 15 mods × both loaders.
  • bun run build — 15 fabric + 15 neoforge jars, filenames unchanged.
  • git diff 26.1.2..HEAD -- '*.java'empty. Wave 0 changes no Java.

Not backported (deliberate)

docs/MC-26.2-NOTES.md (documents a port this branch hasn't done) and .claude/skills/mc-visual-smoke-test (its samples are 26.2 client APIs). docs/TESTING.md points at the latter with a note.

🤖 Generated with Claude Code

chimericdream and others added 7 commits July 26, 2026 12:30
The repo requires LF but nothing enforced it (no .gitattributes, and
core.autocrlf is false locally), so enforcement was ad-hoc. Add the root
* text=auto eol=lf with per-type rules so it is structural.

Effect on this branch is small: `git add --renormalize .` restaged exactly one
file, gradlew.bat, whose committed blob carried CRLF. Under the new
`gradlew.bat text eol=crlf` rule the blob normalizes to LF while the working
copy still checks out CRLF, which is what a Windows batch file wants.

Everything else on 26.1.2 was already LF - see the follow-up commit correcting
the plan's line-ending analysis.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The plan claimed ~4,000 of the payload's 4,226 files were CRLF->LF churn. That
is wrong. The measurement used `git show <rev>:<path>`, which applies
working-tree eol conversion, instead of `git cat-file blob`.

Real census via `git grep -l -I $'\r' <rev>`:

  26.1.2      1 file  (gradlew.bat)
  c5f2cc4   12 files
  main        9 files

26.1.2 is already LF, so Wave 0.1's renormalize restages only gradlew.bat.
Exactly three payload files carry a CRLF mismatch - Beams.java,
CompressedBlocks.java and Covers.java, all minekea, all already listed as
conflict-risk. minekea.md now says to take main's version of those three and
reverse the copper accessors rather than fight the patch.

The 3,993-file generated/ churn is unrelated: 3,840 of those are `0+/1-`, a
removed trailing newline from datagen regeneration. minekea.md already
prescribed regenerating rather than porting, so that plan is unaffected.

.gitattributes still lands first - it makes LF structural and normalizes
gradlew.bat - it is just not load-bearing for diff noise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
org.gradle.parallel = true. Configuration cache stays off (the documented
IDEA/Loom incompatibility is unrelated to parallel execution).

architectury_compat, fabric_compat, modmenu_compat, yacl_compat and
chimericlib_compat were identical across all 15 active mods and drift-prone -
the 6 inactive mods are already stranded at architectury 18.0.5 / chimericlib
4.0.0-beta.0 / modmenu 16.0.0-rc.1 / yacl 3.8.0. Move them to the root
gradle.properties, where every subproject inherits them.

Values are the 26.1.2 line's existing ones, verified uniform across the 15
active mods before centralizing. Two deliberate per-mod overrides remain:
minekea pins chimericlib_compat = 5.0.0-alpha.2, and hopper-xtreme/minekea
declare their own patchouli_compat. minecraft_compat stays per-mod because
scripts/create-modpacks.ts reads it from each mod for the jar filename.

Backport of b1e8709 + 6a7e791. Plan: docs/backport-26.1.2/README.md 0.2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…KEN and mavenLocal

Consumer mods previously depended on chimeric-lib as an external Maven
coordinate resolved from ~/.m2, so every edit to chimeric-lib had to be
republished before any consumer could see it, and a stale ~/.m2 copy would
silently win. Consumers now depend on the in-build chimeric-lib projects
directly. A published-coordinate fallback remains for builds where
chimeric-lib is not in settings.gradle.

Consumers depend on both :chimeric-lib:common and the platform project,
through the `common` configuration: the platform subprojects reclassify their
`jar` as "raw" and put the shaded output in `shadowJar`, so a project() dep on
the platform alone resolves the raw jar without common's classes. Using
`common` rather than `shadowBundle` keeps chimeric-lib out of the consumer's
jar - it ships separately.

Also:
- Drop mavenLocal() from the resolution repositories, so a stale published
  chimeric-lib can no longer shadow in-repo source. publishToMavenLocal is
  unaffected: that is a publishing repository, still configured below.
- Drop the maven.pkg.github.com repo and the GITHUB_TOKEN ext. Nothing this
  build resolves comes from GitHub Packages now, so fork PRs build without
  secrets.
- Document the Terraformers maven URL: artifacts are served from the host root
  after their 2026-07-24 migration off Reposilite; /releases/ 404s. The URL was
  already correct on this branch, so this is the comment only.
- Wire the fabric `test` source set: fabric-loader-junit, useJUnitPlatform(),
  and chimeric-lib common's testFixtures variant (project dep when in-build,
  published variant otherwise). Wave 1 supplies the fixtures themselves.

The `fabricApi { configureTests }` block this branch already had is unchanged,
as is options.release = 25.

Backport of 8999bc7 + 05bf336 + e0e638e + 524e60a (repo half of 5eaceef).
Plan: docs/backport-26.1.2/README.md 0.3.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… project-list

Loom eagerly resolves each mod's classpath during that mod's afterEvaluate. A
consumer resolving chimeric-lib before it has finished configuring fails with
"project components has not been calculated yet". Hoisting chimeric-lib to the
front of the include order makes its parent the first mod evaluated; paired
with evaluationDependsOnChildren() in chimeric-lib/build.gradle (Wave 0.5),
its subprojects are fully configured before any consumer resolves them. Both
pieces are required - neither works alone.

The same edit goes into scripts/settings.gradle.tpl so
`bun run update:settingsgradle` does not revert it.

project-list.json drops the 6 inactive mods, matching settings.gradle (which
already had them commented out on this branch).

Backport of 8999bc7 (settings half) + 8f550ec. Plan:
docs/backport-26.1.2/README.md 0.4.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every mod's root build.gradle was ~68 lines of identical boilerplate (group,
version, archivesName, architectury.platformSetupLoomIde, processResources
token expansion, and the shadow raw-jar/shadowJar reclassification), differing
only in which *_compat keys each mod listed in its expand map. Move all of it
into gradle/mod-conventions.gradle, applied via `apply from:`, and derive the
token map from each mod's own properties (every key ending in _compat, plus
mod_id/mod_name/mod_description). All 14 consumer mods collapse to one line.

Measured variance the generic token map now absorbs: artificial-heart omitted
yacl_compat; hopper-xtreme and minekea add patchouli_compat.

Coordinates normalized so project.version matches the published version:

  archivesName: <name>-<platform>-26.1.2  ->  <name>-<platform>
  version:      5.0.0-alpha.0             ->  26.1.2-5.0.0-alpha.0

The produced jar filename is unchanged either way
(sponj-fabric-26.1.2-5.0.0-alpha.0.jar), so scripts/create-modpacks.ts needs no
change. minecraft_compat stays per-mod for exactly that script.

chimeric-lib additionally keeps evaluationDependsOnChildren() - paired with the
settings.gradle hoist from the previous commit - and its GitHub Packages
publishing block. Its common/fabric build files gain the testFixtures variant
and the gametest wiring that Wave 1's helpers will populate; both changes are
purely additive to what this branch already had.

Per-mod gradle.properties drop the five now-centralized floors. Two overrides
kept deliberately: minekea pins chimericlib_compat = 5.0.0-alpha.2, and
hopper-xtreme/minekea keep patchouli_compat.

The six inactive mods get only the two coordinate lines, matching main - their
old structure is left alone since they are not in settings.gradle and never
configure.

Gate: `./gradlew projects` configures all 15 mods cleanly.

Also corrects the plan, which had said to collapse the inactive mods too.

Backport of a73f6b9 + b98aa70 + b1e8709 (per-mod half). Plan:
docs/backport-26.1.2/README.md 0.5.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rite CLAUDE.md

CI ran JDK 21 against an options.release = 25 build, which cannot compile. Bump
the matrix to 25 and refresh the retired ubuntu-20.04 runner to ubuntu-latest.
Drop the GITHUB_TOKEN env: nothing this build resolves comes from GitHub
Packages now, so fork PRs build without secrets.

New reference docs, copied from main:
- docs/TESTING.md - JUnit bootstrap, GameTest harness, testFixtures. Edited for
  this branch: the MC 26.2 "Components not bound yet" bake is removed from the
  bootstrap recipe (BuiltInRegistries.DATA_COMPONENT_INITIALIZERS does not
  exist on 26.1.2 and components are bound at construction), kept as a
  forward-port note; coordinate examples use 26.1.2-5.0.0-alpha.2; the
  visual-smoke-test section no longer points at a skill that was not backported.
- docs/BLOCK-MIGRATION.md - verbatim, version-independent.
- CODE-REVIEW-PLAN.md, DEPENDENCY-PLAN.md - verbatim so the per-item reasoning
  stays intact, each with a backport banner noting that version strings in
  their examples mean the 26.2 line.
- MOD_IDEAS.md, .claude/settings.json - verbatim.

Deliberately NOT backported: docs/MC-26.2-NOTES.md (documents a port this
branch has not done) and .claude/skills/mc-visual-smoke-test (its samples are
26.2 client APIs).

CLAUDE.md is rewritten rather than copied. The old one described a state that
never existed on this branch - MC 1.21.5, Yarn mappings, Java 21, 3 active
mods - and was misleading every session. It now matches the real
gradle.properties (MC 26.1.2, Mojang mappings, Java 25, 15 active mods) and
documents what Wave 0 just built: mod-conventions.gradle, the centralized
compat floors, the chimeric-lib project() wiring and settings.gradle hoist,
the test commands, and the hopper-xtreme main-source-set gametest exception.
Claims were fact-checked against the tree (68 minekea *DataGenerator classes
under fabric/block/**, not ~55 under fabric/data/block/**).

Backport of 5eaceef + b817d21 + b97a918 + 477cd87 + f91c705 + 4f6415d.
Plan: docs/backport-26.1.2/README.md 0.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 238c7e8b-396d-4a2f-8439-129df4beb530

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backport/26.1.2/shared-build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chimericdream

Copy link
Copy Markdown
Owner Author

Stack index — merge in this order

This is a stacked series. Each PR's base is its parent, so each diff shows only its own work. GitHub retargets children automatically as parents merge.

# PR Base Blocking?
1 #81 shared build infrastructure 26.1.2 yes — everything else is based on it
2 #82 chimeric-lib #81 yes — 6 mods compile against its new API
3 #83 hopper-xtreme · #84 minekea #82 no — the 14 below are mutually independent
#85 sponj · #86 shulker-stuff · #87 houdini-block #82
#88 villager-tweaks · #89 enchantment-numbers-fix #82
#90 banner-tweaks · #91 archaeology-tweaks · #92 miniblock-merchants #82
#93 artificial-heart · #94 athenaeum · #95 beacon-conduit-tweaks · #96 flat-bedrock #82

After #81 and #82 land, the 14 mod PRs can merge in any order — verified: no two touch the same file, and merging all 14 into a scratch integration branch produced zero conflicts.

Integration evidence

backport/26.1.2/integration is pushed as verification only — do not merge it. It is all 14 mod branches merged together, and the full acceptance suite was run against it:

Check Result
./gradlew clean build SUCCESSFUL — 15 mods × both loaders
bun run build exit 0 — 15 fabric + 15 neoforge jars, filenames unchanged
GameTests 70 passed, 0 failed across 15 runs
chimeric-lib unit tests 43 passed, 0 failures/errors
26.2-only API leaks none
Line endings all LF except the intended gradlew.bat

What is not in this series

The 17 "update to 26.2" commits (e4817fa4..c5f2cc4d) — that is the 26.2 port, and backporting it would defeat the purpose. Mod versions stay on the 5.x line; root dependency versions stay at their 26.1.2 values.

Also skipped deliberately: docs/MC-26.2-NOTES.md and .claude/skills/mc-visual-smoke-test, both of which describe 26.2-only APIs.

Corrections found while executing

Two plan claims turned out to be wrong, both from inferring absence rather than checking. Both are corrected in the docs, in the PR that carries them:

  1. CRLF churn (Backport Wave 0: shared build infrastructure (26.1.2) #81) — claimed ~4,000 files, actually 3.
  2. Data-component binding is not 26.2-only (Backport Wave 1: chimeric-lib shared API, fixes and test harness (26.1.2) #82) — the bake is required on 26.1.2 too, which also flipped minekea's datagen instruction.

The underlying lesson, now recorded in the plan: git grep <symbol> 26.1.2 proves a symbol is used, never that it is absent. Use javap on the deobf jar for absence.

@chimericdream
chimericdream merged commit ce19262 into 26.1.2 Jul 27, 2026
3 checks passed
@chimericdream
chimericdream deleted the backport/26.1.2/shared-build branch July 27, 2026 00:42
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