[7.0] CI build fails unless `syncMavenizer` is run before `build`
- 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
Known limitation. I've discovered a workaround for ForgeDev 7 and will implement it in ForgeGradle 7 later.
This will be fixed by #1020, as the compileJava task for the source set will depend on its syncMavenizer task.
I am temporarily re-opening this, as the build that fixes this bug failed.
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.