-
Notifications
You must be signed in to change notification settings - Fork 31
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
Multi-mod workspaces with dependencies have duplicate Minecraft entries in the classpath #124
Comments
A workaround is to declare Neo dependencies against the |
I would not call this a bug, more like an intended feature. Your "workaround" is how you should declare your dependencies to begin with, the dependency on NeoForge should not be leaked, as that will cause issues for the consumers of your artifact too. |
Well, I still do not quite understand why Gradle is not collapsing this dependency 🤔 |
But you need NeoForge in compileClasspath AND runtimeClasspath, but not leaked to consumers - there's no way to do this by default in gradle so you need a custom configuration. This is a huge pain compared to previous versions. |
Each project has its own generated neoforge repo, and since the artifacts are different it passes them all, is my undersatnding |
Is this issue also the cause of neoforged/NeoGradle#162? |
Gradle will do that, but the IDE won't it looks like. NG7 should collapse them yeah (it currently does not because it creates one IVY repo per project, but that is fixable by using the root project instead, plus some fenagling with task dependencies). But this problem always existed (different ATs, different subprojects with minecraft etc) and FML handled that always gracefully. What changed that it does not do that now? |
This was resolved with a change to NeoGradle: neoforged/NeoGradle#167 - as far as I understand the error for duplicate minecraft jars is now intended behaviour, and it's on tools like Gradle to properly remove the duplicates. |
This causes https://github.com/neoforged/FancyModLoader/blob/main/loader/src/main/java/net/neoforged/fml/util/DevEnvUtils.java#L72 to throw when it detects multiple Minecraft classes on the classpath
The text was updated successfully, but these errors were encountered: