Skip to content

Commit 2c3c884

Browse files
committed
Fix sources for dependencies in the deobfCompile and deobfProvided configuration not getting downloaded and remapped
1 parent 2766450 commit 2c3c884

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
@@ -611,12 +611,19 @@ private void remapDeps(Project project, Configuration config, String resolvedCon
611611

612612
int taskId = 0;
613613

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

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

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

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

0 commit comments

Comments
 (0)