MinecraftForge / ForgeGradle

Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
508 stars 437 forks source link

Error "Cannot mutate content repository descriptor" #912

Closed henkelmax closed 1 year ago

henkelmax commented 1 year ago

Since version 5.1.70 ForgeGradle fails to set up with the error Cannot mutate content repository descriptor 'BUNDELED_-1284700514' after repository has been used. Version 5.1.69 works perfectly fine.

https://gist.github.com/henkelmax/f26c23724486c418e2ed58c24a811df9

SizableShrimp commented 1 year ago

Please provide your build.gradle

henkelmax commented 1 year ago

Please provide your build.gradle

https://github.com/henkelmax/simple-voice-chat/blob/1.19.4/forge/build.gradle

marchermans commented 1 year ago

You seem to be applying the plugin twice. Although I am unsure what is causing the issue in your case, I would start with fixing that.

henkelmax commented 1 year ago

You seem to be applying the plugin twice. Although I am unsure what is causing the issue in your case, I would start with fixing that.

Yeah, doesn't make a difference.

Matyrobbrt commented 1 year ago

The eager all and resolution of the recursive shadow copy configuration in https://github.com/henkelmax/simple-voice-chat/blob/1.19.4/forge/build.gradle#L33-L36 is the most likely to cause this issue. You should instead use the minecraftLibrary configuration as described on the wiki. It's also recommended you avoid using eager configuration methods and instead use lazy ones such as configureEach. For further debugging though, please join the Forge Discord server in the #gradle channel.

henkelmax commented 1 year ago

That worked, thanks for the help @Matyrobbrt