Skip to content

Introduce Stonecutter for modern Minecraft version management - #23

Merged
turtton merged 6 commits into
mainfrom
feat/stonecutter-modern
May 12, 2026
Merged

turtton merged 6 commits into
mainfrom
feat/stonecutter-modern

Conversation

@turtton

@turtton turtton commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Migrate main branch (1.21.11+) from single-version Loom config to Stonecutter 0.9.3 (kotlinController, centralScript) so future minor MC versions can live side-by-side as versions/<mc>/.
  • CI matrix becomes version × task (currently ['1.21.11'] × ['build', 'runServertest', 'runClienttest']); release workflow validates v<modver>+<mcver> tags strictly and uploads versions/<mcver>/build/libs/fabpose-<modver>+<mcver>.jar.
  • Legacy versions (1.21.10 and earlier) intentionally stay on their existing branches; a separate plans/stonecutter-migration-legacy.md will follow.

Highlights

  • settings.gradle.kts: adds Stonecutter plugin + create(rootProject) { versions("1.21.11") }.
  • stonecutter.gradle.kts: registers chiseledBuild against stonecutter.tasks.named("build") (0.9.x API).
  • build.gradle.kts: AW path → rootProject.file(...), sourceSets / Kotlin srcDirs anchored to rootProject.file(...), cleanupXvfb gets group = "verification".
  • versions/1.21.11/gradle.properties carries MC-specific properties; root gradle.properties keeps only maven_group / archives_base_name.
  • .github/workflows/build.yml: matrix split for runClienttest (only that step gets ALSOFT_DRIVERS=null / SDL_AUDIODRIVER=dummy).
  • .github/workflows/publish.yml: strict tag regex (path-safe MOD_VERSION), mc-publish version = ${mod}+${mc}, concurrency guard.
  • CLAUDE.md / AGENTS.md: document the new layout, :<mc>: task prefix, chiseledBuild, "Adding a new MC version" steps, and v<modver>+<mcver> tag convention.

Verification

  • ./gradlew chiseledBuild ✅ (commit 29b52c0).
  • ./gradlew :1.21.11:build / lintKotlin / publishToMavenLocal ✅.
  • ./gradlew :1.21.11:runServertest → 12/12 game tests pass.
  • ./gradlew :1.21.11:runClienttest → ローカルは PulseAudio 欠如により exit 134 (環境依存)。CI 側は ALSOFT_DRIVERS=null / SDL_AUDIODRIVER=dummy で動作確認予定。
  • Jar 内容を Stonecutter 化前の baseline (temp/baseline-fabpose.jar) と比較し、エントリ一覧 / fabric.mod.json / fabpose.mixins.json / fabpose.accesswidener が一致 (version 以外差分 0)。
  • momus 計画レビュー OK、oracle 2 サイクル review (build / CI / docs) 完了、IMPORTANT/CRITICAL は本 PR で適用済み。

Plan & Reference

  • 計画書: plans/stonecutter-migration-modern.md (status banner + checkbox を実装後ステートに更新済み)。
  • 関連コミット: 5228654 → 29b52c0 → 2751056 → 471eeb3 → 9ffe3f8 → d3d52e7。
  • Legacy グループ (1.20.1〜1.21.10 / Yarn / PosingEntity) は 本 PR 範囲外。別計画書で後追い予定。

turtton added 6 commits May 11, 2026 21:30
Plan reviewed and approved by Momus.
Wire Stonecutter 0.9.3 into the build so that the modern Mannequin-based
codebase is managed as a versioned subproject instead of relying on
per-version git branches. This is the first step of the migration plan
in plans/stonecutter-migration-modern.md.

- Add dev.kikugie.stonecutter 0.9.3 plugin via settings.gradle.kts with
  kotlinController and centralScript pointing at the existing
  build.gradle.kts.
- Move Minecraft / loader / Fabric API / FLK versions from root
  gradle.properties to versions/1.21.11/gradle.properties so the
  shared buildscript reads them per-subproject.
- Register a chiseledBuild aggregator task in stonecutter.gradle.kts
  using the Stonecutter 0.9 API (stonecutter.tasks.named("build")).
- Repoint accessWidener, source/resource/kotlin srcDirs and the
  jar LICENSE copy to rootProject.file(...) so the shared buildscript
  resolves sources from the repository root rather than the
  versions/<mc>/ subproject directory.
- Apply DuplicatesStrategy.INCLUDE to all AbstractCopyTask instances to
  avoid the duplicate fabpose.accesswidener entries that Loom emits
  when the access widener also lives under the shared resources dir.
- Add 'verification' group + description to the cleanupXvfb task so it
  surfaces in 'gradle tasks' and is easy to discover in QA runs.
- Ignore temp/ (used for baseline jar diffing during the migration).

:1.21.11:build produces a jar whose file listing, fabric.mod.json,
fabpose.mixins.json and fabpose.accesswidener are byte-identical to the
pre-migration baseline (modulo the version field expansion).
- build.yml: matrix split into version x task; gradle target uses
  :${version}:${task}; artifact path moved to versions/${version}/build/libs/;
  dead java==17 condition removed.
- publish.yml: build the per-version subproject (:${mc}:build) and
  upload jars from versions/${mc}/build/libs/.
- CLAUDE.md (AGENTS.md): document Stonecutter layout, per-version
  Gradle targets, chiseledBuild, and how to add a new MC version.
- build.gradle.kts: align clienttest report-file with servertest by
  using `.get()` on layout.buildDirectory; refresh stale comment.
- CLAUDE.md: clarify config format (Gson JSON, not JSON5) and document
  optional `stonecutter active` pointer update for new MC versions.
- plans/stonecutter-migration-modern.md: sync B-5 / C-3 / E-1 / E-2
  snippets with the actually shipped Stonecutter 0.9.x API and the CI
  matrix layout. Mark the legacy companion plan as not-yet-created.
- publish.yml: narrow tag trigger to 'v*+*' and add an upfront step that
  validates the tag matches v<modver>+<mcver> and that the referenced
  versions/<mc>/gradle.properties exists, so malformed tags fail fast
  with a clear message instead of confusing Gradle errors.
- build.yml: export ALSOFT_DRIVERS=null and SDL_AUDIODRIVER=dummy for
  the matrix build step so runClienttest no longer risks OpenAL/SDL
  audio initialization crashes on headless CI runners.
- publish.yml: strict tag validate regex (path-safe MOD_VERSION),
  unique \$mod+\$mc version for mc-publish, concurrency guard.
- build.yml: split client/non-client steps so ALSOFT_DRIVERS /
  SDL_AUDIODRIVER only apply to runClienttest.
- plans: mark Phase A-F + executable DoD items shipped, add status
  banner and reference section (commits 5228654..9ffe3f8), clarify
  AW handling (rootProject.file in 1.21.11-only setup).
- CLAUDE.md: document v<modver>+<mcver> tag convention and the
  validated publish artifact path.
@turtton
turtton merged commit 1d443db into main May 12, 2026
4 checks passed
@turtton
turtton deleted the feat/stonecutter-modern branch May 12, 2026 13:03
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