From 62e89395f97563978c5c89030b164f6db3016a91 Mon Sep 17 00:00:00 2001 From: Kitlith Date: Sun, 15 Nov 2020 08:05:35 -0800 Subject: [PATCH] Configure build task dependencies as each subproject comes up. (#299) --- src/main/java/net/fabricmc/loom/AbstractPlugin.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/fabricmc/loom/AbstractPlugin.java b/src/main/java/net/fabricmc/loom/AbstractPlugin.java index c6cbc86..82d164e 100644 --- a/src/main/java/net/fabricmc/loom/AbstractPlugin.java +++ b/src/main/java/net/fabricmc/loom/AbstractPlugin.java @@ -304,17 +304,15 @@ public class AbstractPlugin implements Plugin { } }); }); - - for (Project subProject : rootProject.getAllprojects()) { - subProject.getTasks().getByName("build").dependsOn(parentTask); - subProject.getTasks().getByName("build").dependsOn(rootProject.getTasks().getByName("remapAllJars")); - rootProject.getTasks().getByName("remapAllJars").dependsOn(subProject.getTasks().getByName("remapJar")); - } } else { parentTask = rootProject.getTasks().getByName("remapAllSources"); remapper = ((RemapAllSourcesTask) parentTask).sourceRemapper; remapJarTask.jarRemapper = ((RemapJarTask) rootProject.getTasks().getByName("remapJar")).jarRemapper; + + project1.getTasks().getByName("build").dependsOn(parentTask); + project1.getTasks().getByName("build").dependsOn(rootProject.getTasks().getByName("remapAllJars")); + rootProject.getTasks().getByName("remapAllJars").dependsOn(project1.getTasks().getByName("remapJar")); } }