apply nested JAR dependencies to every remapJar task which nests
parent
7c25b0399c
commit
3094d70731
|
@ -34,7 +34,7 @@ dependencies {
|
|||
implementation ('org.zeroturnaround:zt-zip:1.13')
|
||||
implementation ('com.google.code.gson:gson:2.8.5')
|
||||
implementation ('com.google.guava:guava:27.1-jre')
|
||||
implementation ('net.fabricmc:stitch:0.1.2.49') {
|
||||
implementation ('net.fabricmc:stitch:0.1.2.50') {
|
||||
exclude module: 'enigma'
|
||||
}
|
||||
implementation ('net.fabricmc:tiny-remapper:0.1.0.33') {
|
||||
|
@ -42,7 +42,7 @@ dependencies {
|
|||
}
|
||||
implementation ('org.jetbrains:intellij-fernflower:1.0.0.8')
|
||||
|
||||
implementation ('net.fabricmc:sponge-mixin:0.7.11.22') {
|
||||
implementation ('net.fabricmc:sponge-mixin:0.7.11.23') {
|
||||
exclude module: 'launchwrapper'
|
||||
exclude module: 'guava'
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
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(remapJarTask::dependsOn);
|
||||
NestedJars.getRequiredTasks(project1).forEach(task::dependsOn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
AbstractArchiveTask sourcesTask = (AbstractArchiveTask) project1.getTasks().getByName("sourcesJar");
|
||||
|
|
Loading…
Reference in New Issue