Backport Wave 0: shared build infrastructure (26.1.2) - #81
Conversation
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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Stack index — merge in this orderThis 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.
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
What is not in this seriesThe 17 "update to 26.2" commits ( Also skipped deliberately: Corrections found while executingTwo 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:
The underlying lesson, now recorded in the plan: |
Wave 0 of the
main→26.1.2backport. 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:
What's here
.gitattributesgradlew.bat(blob LF, worktree CRLF).gradle.propertiesparallel = true; the five*_compatfloors centralized.build.gradleproject()dep; dropsmavenLocal(), the GitHub Packages repo andGITHUB_TOKEN; wires the fabrictestsource set.settings.gradle+ tplchimeric-libto the front of the include order.gradle/mod-conventions.gradlebuild.gradlecollapses to oneapply from:line.options.release = 25, so CI literally could not compile);docs/,CODE-REVIEW-PLAN.md,DEPENDENCY-PLAN.md;CLAUDE.mdrewritten.Wave 0 owns every
*.gradleandgradle.propertiesin 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 andevaluationDependsOnChildren()inchimeric-lib/build.gradleare both required — neither works alone.Coordinates changed, filenames did not
The produced jar is byte-identically named, so
scripts/create-modpacks.tsneeds 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 viagit cat-file blob:26.1.2has 1 CRLF file (gradlew.bat),c5f2cc4d12,main9. Only 3 payload files mismatch, all in minekea and all already on its conflict list.README.mdandminekea.mdare 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.mdpoints at the latter with a note.🤖 Generated with Claude Code