Add a jarJar dependency and a call to jarJar.component(it) inside the publication. Alternatively, apply the following patch:
```diff
index 010471f..f7900b8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -123,6 +123,7 @@ repositories {
// flatDir {
// dir 'libs'
// }
+ mavenCentral()
}
dependencies {
@@ -131,6 +132,8 @@ dependencies {
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.19.4-45.0.29'
+ jarJar(group: 'com.google.code.gson', name: 'gson', version: '[2.0,3.0)')
+
// Real mod deobf dependency examples - these get remapped to your current mappings
// implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
@@ -167,6 +170,7 @@ publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
+ jarJar.component(it)
}
}
repositories {
```
Start a build. You will receive a Cannot mutate content repository descriptor 'BUNDELED_-1772914211(file:/home/squid/.gradle/caches/forge_gradle/bundled_deobf_repo)' after repository has been used error
Further notes:
I realise this is a similar report to #912. However, this pattern of using jarJar.component is documented and (AFAIK) expected to work, so does feel like a bug
Steps to reproduce:
Add a
jarJar
dependency and a call tojarJar.component(it)
inside the publication. Alternatively, apply the following patch:Cannot mutate content repository descriptor 'BUNDELED_-1772914211(file:/home/squid/.gradle/caches/forge_gradle/bundled_deobf_repo)' after repository has been used
errorFurther notes:
I realise this is a similar report to #912. However, this pattern of using
jarJar.component
is documented and (AFAIK) expected to work, so does feel like a bug