diff --git a/src/main/java/com/wildermods/workspace/ProjectDependencyType.java b/src/main/java/com/wildermods/workspace/ProjectDependencyType.java index 7ec8ac6..6ad9d15 100644 --- a/src/main/java/com/wildermods/workspace/ProjectDependencyType.java +++ b/src/main/java/com/wildermods/workspace/ProjectDependencyType.java @@ -46,5 +46,14 @@ public enum ProjectDependencyType { */ excludedFabricDeps, + /** + * A non-transitive subdependency of a dependency. These dependencies are needed only at compile time, as + * they will be included by other dependencies at runtime. + * + * For example, fabric loader has mixinExtras as a transitive dependency. MixinExtras is automatically included + * at runtime by extracting it from fabric-loader's jar via JarInJar. + * + * At compile time, however, it is unavailable as it's nested inside of fabric-loader + */ retrieveJson } diff --git a/src/main/java/com/wildermods/workspace/WilderWorkspacePluginImpl.java b/src/main/java/com/wildermods/workspace/WilderWorkspacePluginImpl.java index 7ddfddd..74eac93 100644 --- a/src/main/java/com/wildermods/workspace/WilderWorkspacePluginImpl.java +++ b/src/main/java/com/wildermods/workspace/WilderWorkspacePluginImpl.java @@ -385,17 +385,15 @@ private void setupTasks(WWProjectContext context) { }); project.getTasks().register("copyProjectDependencies", Copy.class, task -> { - task.doFirst(t -> { - // Get the files from the exclusion configuration - Set exclusionFiles = excludedFabricDeps.getResolvedConfiguration().getFiles(); + // Get the files from the exclusion configuration + Set exclusionFiles = excludedFabricDeps.getResolvedConfiguration().getFiles(); - task.from(resolvableImplementation, copySpec -> { - // Exclude files that are in the exclusion configuration - copySpec.exclude(fileTreeElement -> exclusionFiles.contains(fileTreeElement.getFile())); - }); - - task.into(Path.of(extension.getGameDestDir()).resolve("fabric")); - }); + task.from(resolvableImplementation, copySpec -> { + // Exclude files that are in the exclusion configuration + copySpec.exclude(fileTreeElement -> exclusionFiles.contains(fileTreeElement.getFile())); + }); + + task.into(Path.of(extension.getGameDestDir()).resolve("fabric")); }); }