New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.20.4] Sourcesets hack breaks Groovy mod builds #9844
Comments
To make this clear and public documentation. The fundamental issue is that gradle doesn't like the output of two tasks being overlapped. |
Gradle and run configs are my weakness I'm afraid, so can't advise too strongly on an approach. I gave arch loom's solution as a possible idea as it looked like one that would avoid the headaches of Gradle altogether. The issue can be reproduced from the CLI outside of IntelliJ, so I don't believe the fix should be opt-in for non-eclipse environments (such as CI running |
Well, unless someone else volunteers this looks like its gunna stall then. Because for normal mod development the current system works fine. And personally all the other language loaders should be on the loader to support their edge cases, not us. Minecraft is written in java, the only language Forge officially supports is Java. And it, in all of my tests is fully functional for java. As for CIs, the paths don't matter for a CI as they are just producing the result. They could just disable the merging on CI. Thats why im curious to see any other JPMS gradle project in existence. See how they deal with this basic java limitation. My bet {based on trying to find examples} is that almost no project exists that properly uses the JPMS with gradle. |
Any Gradle plugin that relies on the output of one sourceset to compile or process another is currently broken - Groovy was an example that affects me. Needing the sourcesets hack in build.gradle seems to have been a common problem for people porting to 1.20.4 as the error when missing it doesn't make the culprit obvious and isn't a solution for things like multiloader or other special build systems. Turns out a lot didn't check the MDK. The comment on the sourcesets bit says that it will eventually be migrated to FG. We can't really do that if it breaks some people's builds - especially if different logic is required for CI vs local dev. I've tried a couple of different approaches in Gradle and run configs but had no luck, they're my weakness. I don't really care how you end up solving it - restoring MOD_CLASSES only in userdev with UnionRelauncher or some other approach, but it needs to be done if you want it to be part of FG and to solve what's currently the most common source of confusion when porting. |
Minecraft Version: 1.20.4
Forge Version: 49.0.14
Logs:
Steps to Reproduce:
The changes from stock MDK are
implementation localGroovy()
, theid 'groovy'
plugin and a Test.groovy source file to make the plugin do something.Description of issue:
The current technique of combining sourcesets in build.gradle is incompatible with certain types of builds and JVM languages, such as multiplatform mod dev and language providers like Groovy. The former have solved the issue by partially reimplementing union launching only in the dev environment, which I think is a good approach from the perspective of minimising the chance of breaking gradle plugins, while the latter doesn't have any easy solution without more workarounds.
I consider this issue a blocker for 1.20.4 RB.
The text was updated successfully, but these errors were encountered: