Skip to content

Commit 57abd0f

Browse files
committed
Merge pull request #276 from Texasjake95/master
Fix sources for dependencies in the deobfCompile and deobfProvided configurations not getting downloaded and remapped
2 parents 31ebe02 + 2c3c884 commit 57abd0f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/java/net/minecraftforge/gradle/user/UserBasePlugin.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,12 +612,19 @@ private void remapDeps(Project project, Configuration config, String resolvedCon
612612

613613
int taskId = 0;
614614

615+
// FOR SOURCES!
616+
617+
HashMap<ComponentIdentifier, ModuleVersionIdentifier> idMap = Maps.newHashMap();
618+
615619
// FOR BINARIES
616620

617621
for (ResolvedArtifact artifact : config.getResolvedConfiguration().getResolvedArtifacts())
618622
{
619623
ModuleVersionIdentifier module = artifact.getModuleVersion().getId();
620624
String group = "deobf." + module.getGroup();
625+
626+
// Add artifacts that will be remapped to get their sources
627+
idMap.put(artifact.getId().getComponentIdentifier(), module);
621628

622629
TaskSingleDeobfBin deobf = makeTask(config.getName() + "DeobfDepTask" + (taskId++), TaskSingleDeobfBin.class);
623630
deobf.setInJar(artifact.getFile());
@@ -630,10 +637,6 @@ private void remapDeps(Project project, Configuration config, String resolvedCon
630637
project.getDependencies().add(resolvedConfig, group + ":" + module.getName() + ":" + module.getVersion());
631638
}
632639

633-
// FOR SOURCES!
634-
635-
HashMap<ComponentIdentifier, ModuleVersionIdentifier> idMap = Maps.newHashMap();
636-
637640
for (DependencyResult depResult : config.getIncoming().getResolutionResult().getAllDependencies())
638641
{
639642
idMap.put(depResult.getFrom().getId(), depResult.getFrom().getModuleVersion());

0 commit comments

Comments
 (0)