Skip to content

Update build toolchain - #85

Draft
SmylerMC wants to merge 16 commits into
masterfrom
chore/update-build-toolchain
Draft

Update build toolchain#85
SmylerMC wants to merge 16 commits into
masterfrom
chore/update-build-toolchain

Conversation

@SmylerMC

@SmylerMC SmylerMC commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Running old toolchains is starting to be painful in modern IDEs (recently experienced issues with Intellij which I could only solve by updating the gradle wrapper). This PR updates the build toolchain.

Updated components

  • Gradle: 4.8.1 -> 8.14.5 (newest version compatible with Java 8)
  • ForgeGradle: 2.3 -> 6.0 (newest version compatible with Gradle 8)
  • JUnit: 4 -> 5 (newest version compatible with Java 8)

Other notable changes

  • Refactored the build script to make it closer to "modern" Forge project templates

Issues and workarounds

Minecraft 1.12.2 support in ForgeGradle 6 (or any other version higher than ForgeGradle 3), is a best attempt with no real support. It works well in simple cases but falls on it heads when you start adding things like dependencies to mods that load coremods, or even worse, Mixins. Bad news for us, we depend on CubicChunks.

Workarounds:

  • explicitly tell FML to load the coremods we need,
  • disable a RetroGradle compatibility option that is supposed to ease the use of 1.12 with modern FG (yeah, I known how it sounds),
  • explicitly deobfuscate mod dependencies that have coremods and mixins, even if we have a dev dependency,
  • do a dirty hack on the ForgeGradle de-obfuscated dependency cache to make sure compatibility code in the mixin lib triggers behaves as expected (complementary with the above).

SmylerMC added 16 commits July 20, 2026 01:32
Also bumps Forge itself to 1.12.2-14.23.5.2864.
This reverts commit 04b6eda8a3b501ef793c0a177fe08a7139574d8a.
This is supposedly the latest version compatible with Java 8.
(v6 does not support Java 8)
MixinPlatformAgentFMLLegacy, which is shipped by CubicChunks and loads mixins in pre 1.13 FML environments, has some logic for dev-time runs that assumes ForgeGradle 2 (see MixinPlatformAfentFMLLegacy#isIgnoredReparseable()). This logic fails on ForgeGradle 3+ because the cache directory for deobfuscated dependencies has been renamed from deobfedDeps to deobf_dependencies, and Mixin looks for deobfedDeps in the resolved mod file path. Because it resolves the path before the check, we can trick it with symlinks, which is the workaround.
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