[6.0] Task genIntellijRuns -> runtimeClasspathCopy is failing
I am getting the following error:
Execution failed for task ':genIntellijRuns'.
> Could not resolve all files for configuration ':runtimeClasspathCopy'.
> Could not resolve net.sf.jopt-simple:jopt-simple:5.0.4.
Required by:
project :
project : > net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21 > net.minecraft:client:1.21
project : > net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21 > net.minecraftforge:fmlloader:1.21-51.0.26
project : > net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21 > net.minecraftforge:fmlearlydisplay:1.21-51.0.26
> Cannot find a version of 'net.sf.jopt-simple:jopt-simple' that satisfies the version constraints:
Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.sf.jopt-simple:jopt-simple:5.0.4'
Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'com.example.examplemod:example-mod-forge:1.0.0' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:{strictly 5.0.4}'
Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraft:client:1.21' (runtime) --> 'net.sf.jopt-simple:jopt-simple:5.0.4'
Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraftforge:accesstransformers:8.2.0' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraftforge:modlauncher:10.2.1' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraftforge:fmlloader:1.21-51.0.26' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:5.0.4'
Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraftforge:fmlearlydisplay:1.21-51.0.26' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:5.0.4'
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 818ms
8 actionable tasks: 3 executed, 5 up-to-date
The first apperance was on an multiloader setup, but i tested it with an mod that was build with the mdk and was implemented in an mdk setup. Everytime i get this error. I also switched the gradle versions from 8.7 up to 8.9, rebuild the complete project.
The only solution i got is to disable/remove the implementation of jopt-simple before building/publish the jar file, then the error isn't triggered/appearing
Edit 1:
Also wiped the complete .gradle folder on C:/User/
Please let me know if this is still an issue. Keep in mind that we've recently fixed the need for the JOpt Simple dependency constraint.
No since then it didn't happen again.
It only happend when i use this configuration: https://github.com/jaredlll08/MultiLoader-Template/blob/1.21.5/buildSrc/src/main/groovy/multiloader-loader.gradle When i removed the configuration part it worked normaly again.
In that case I will chalk it up as an issue with ForgeGradle 6's inability to work properly in multi-project setups. This is something I've actively worked to enable in ForgeGradle 7, so as to be friendlier with multi-loader setups. ForgeGradle 6 is very fragile since a lot of the hacks it uses are so deeply integrated into Gradle internals that the early resolution of literally anything could cause breakages.
I will close this once I PR ForgeGradle 7 support into the more popular multi-loader templates.
Will ForgeGradle 7 also have support for Mojang mapped Accesstransformer?
Yes.