ForgeGradle icon indicating copy to clipboard operation
ForgeGradle copied to clipboard

[7.0] CI build fails unless `syncMavenizer` is run before `build`

Open Choonster opened this issue 3 months ago • 1 comments

  • ForgeGradle version: 7.0.0-beta.51
  • Minecraft version: 1.21.11
  • Forge version: 61.0.1

When running the build task in a CI build (e.g. GitHub Actions), it will fail with compilation errors unless syncMavenizer is manually run beforehand. In ForgeGradle 6, running build was enough to trigger the workspace setup.

This doesn't happen when opening the project in IntelliJ IDEA, which automatically runs syncMavenizer.

  • Minimal reproduction: https://github.com/Choonster-Minecraft-Mods/ForgeGradle7CITestMod
  • Failed run with only build: https://github.com/Choonster-Minecraft-Mods/ForgeGradle7CITestMod/actions/runs/20110334595/job/57705630921
  • Successful run with syncMavenizer: https://github.com/Choonster-Minecraft-Mods/ForgeGradle7CITestMod/actions/runs/20110678909/job/57706817950

Choonster avatar Dec 10 '25 19:12 Choonster

Known limitation. I've discovered a workaround for ForgeDev 7 and will implement it in ForgeGradle 7 later.

Jonathing avatar Dec 10 '25 23:12 Jonathing

This will be fixed by #1020, as the compileJava task for the source set will depend on its syncMavenizer task.

Jonathing avatar Dec 18 '25 11:12 Jonathing

I am temporarily re-opening this, as the build that fixes this bug failed.

Jonathing avatar Dec 21 '25 18:12 Jonathing

This issue has resurfaced in #1031. Please follow it for further updates. Apologies for the reoccurring issues with syncMavenizer, it's a bit of a weird problem to solve.

Jonathing avatar Jan 02 '26 00:01 Jonathing