Skip to content

Commit 06e3b6e

Browse files
committed
Make the mod configurations non-transitive since they cannot apply the remapping to transitive dependencies.
1 parent d897dee commit 06e3b6e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

LEGACY.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ obfuscation {
6868

6969
When reobfuscating a jar, it will be replaced in publications with the obfuscated version to avoid publishing jars that aren't mapped to SRG.
7070

71-
## Remapping mod dependencies
71+
## Remapping Mod Dependencies
7272
As published mods are using intermediary mappings, you must remap them to official mappings before being able to use them as a dependencies.
73-
ModDevGradle creates configurations that will automatically remap dependencies added to them from SRG mappings to official mappings.
73+
ModDevGradle creates configurations that will automatically remap dependencies added to them from SRG mappings to official mappings.
74+
75+
**IMPORTANT:** These configurations are not transitive, you will have to manually add transitive dependencies of the mods you are adding.
76+
7477
The following configurations are created automatically and are children of the configurations without the `mod` prefix:
7578
- `modImplementation`
7679
- `modRuntimeOnly`

src/legacy/java/net/neoforged/moddevgradle/legacyforge/dsl/Obfuscation.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public Configuration createRemappingConfiguration(Configuration parent) {
119119
c.attributes(a -> a.attribute(LegacyForgeModDevPlugin.REMAPPED, true));
120120
});
121121
});
122+
externalModuleDependency.setTransitive(false);
122123
} else if (dep instanceof FileCollectionDependency fileCollectionDependency) {
123124
project.getDependencies().constraints(constraints -> {
124125
constraints.add(parent.getName(), fileCollectionDependency.getFiles(), c -> {
@@ -131,6 +132,7 @@ public Configuration createRemappingConfiguration(Configuration parent) {
131132
c.attributes(a -> a.attribute(LegacyForgeModDevPlugin.REMAPPED, true));
132133
});
133134
});
135+
projectDependency.setTransitive(false);
134136
}
135137
}));
136138
});

0 commit comments

Comments
 (0)