Description
When we have a project with subprojects for different versions of NeoForge/Minecraft builds usually fail with:
- first run always fails in
neoFormApplyForgesAccessTransformer of one or more of the projects.
- subsequent runs fail, 90% of the cases, in
neoFormPatch and 10% in neoFormApplyForgesAccessTransformer.
If we make all neoForm* tasks run sequentially like in all task form the second project always run after all neoForm* task from the first. The problem disappears.
The attached project neo-sub-projects-test.tar.gz demonstrates the problem and contains a very simple plugin that can synchronise the tasks from the subprojects. Unfortunately I wasn't able to make it part of the root build script.
Both subprojects are based on the respective template mod projects for that version of Minecraft.
How to test
- unpack the archive
- run
./gradlew build - the build will fail in neoFormApplyForgesAccessTransformer of on of the subprojects.
- run
./gradle build again - it will probably fail in neoFormPatch of the same project.
to reset and test with sync on:
- run
./gradlew cleanCache clean - cleanCache will probably fail
- run
./gradlew cleanCache clean
- to enable the synchronous mode please edit the root
gradle.properties file changing doNeoSync=false to doNeoSync=true
- run
./gradlew build - the build will be successful
Speculations
I have a hunch that the main problem is in how NeoGradle handles its cache. May be something gets overwritten or something like that.
Special Considerations
For cleanCache tasks to work at all these properties are set for all projects:
org.gradle.caching=false
org.gradle.configuration-cache=false
Description
When we have a project with subprojects for different versions of NeoForge/Minecraft builds usually fail with:
neoFormApplyForgesAccessTransformerof one or more of the projects.neoFormPatchand 10% inneoFormApplyForgesAccessTransformer.If we make all
neoForm*tasks run sequentially like in all task form the second project always run after allneoForm*task from the first. The problem disappears.The attached project neo-sub-projects-test.tar.gz demonstrates the problem and contains a very simple plugin that can synchronise the tasks from the subprojects. Unfortunately I wasn't able to make it part of the root build script.
Both subprojects are based on the respective template mod projects for that version of Minecraft.
How to test
./gradlew build- the build will fail inneoFormApplyForgesAccessTransformerof on of the subprojects../gradle buildagain - it will probably fail inneoFormPatchof the same project.to reset and test with sync on:
./gradlew cleanCache clean- cleanCache will probably fail./gradlew cleanCache cleangradle.propertiesfile changingdoNeoSync=falsetodoNeoSync=true./gradlew build- the build will be successfulSpeculations
I have a hunch that the main problem is in how NeoGradle handles its cache. May be something gets overwritten or something like that.
Special Considerations
For
cleanCachetasks to work at all these properties are set for all projects: