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

dev/0.11
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
1 changed files with 4 additions and 6 deletions

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"));
}
}