Configure build task dependencies as each subproject comes up. (#299)

This commit is contained in:
Kitlith 2020-11-15 08:05:35 -08:00 committed by GitHub
parent db623157aa
commit 62e89395f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -304,17 +304,15 @@ public class AbstractPlugin implements Plugin<Project> {
}
});
});
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"));
}
}