mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
apply nested JAR dependencies to every remapJar task which nests
This commit is contained in:
@@ -267,8 +267,17 @@ public class AbstractPlugin implements Plugin<Project> {
|
||||
remapJarTask.doLast(task -> project1.getArtifacts().add("archives", remapJarTask.jar));
|
||||
remapJarTask.dependsOn(project1.getTasks().getByName("jar"));
|
||||
project1.getTasks().getByName("build").dependsOn(remapJarTask);
|
||||
//Run all the sub project remap jars tasks before the root projects jar, this is to allow us to include projects
|
||||
NestedJars.getRequiredTasks(project1).forEach(remapJarTask::dependsOn);
|
||||
|
||||
Map<Project, Set<Task>> taskMap = project.getAllTasks(true);
|
||||
for (Map.Entry<Project, Set<Task>> entry : taskMap.entrySet()) {
|
||||
Set<Task> taskSet = entry.getValue();
|
||||
for (Task task : taskSet) {
|
||||
if (task instanceof RemapJar && ((RemapJar) task).isNestJar()) {
|
||||
//Run all the sub project remap jars tasks before the root projects jar, this is to allow us to include projects
|
||||
NestedJars.getRequiredTasks(project1).forEach(task::dependsOn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
AbstractArchiveTask sourcesTask = (AbstractArchiveTask) project1.getTasks().getByName("sourcesJar");
|
||||
|
||||
Reference in New Issue
Block a user