diff --git a/build-caching/src/main/java/com/vertispan/j2cl/build/task/TaskFactory.java b/build-caching/src/main/java/com/vertispan/j2cl/build/task/TaskFactory.java index 78316e45..5ac47414 100644 --- a/build-caching/src/main/java/com/vertispan/j2cl/build/task/TaskFactory.java +++ b/build-caching/src/main/java/com/vertispan/j2cl/build/task/TaskFactory.java @@ -67,6 +67,7 @@ protected List scope(Collection dependencies, Dep return dependencies.stream() .filter(d -> ((com.vertispan.j2cl.build.Dependency) d).belongsToScope(scope)) .map(Dependency::getProject) + .distinct() .collect(Collectors.toUnmodifiableList()); } diff --git a/j2cl-tasks/src/main/java/com/vertispan/j2cl/build/provided/ClosureTask.java b/j2cl-tasks/src/main/java/com/vertispan/j2cl/build/provided/ClosureTask.java index 871edfc2..683fdfb0 100644 --- a/j2cl-tasks/src/main/java/com/vertispan/j2cl/build/provided/ClosureTask.java +++ b/j2cl-tasks/src/main/java/com/vertispan/j2cl/build/provided/ClosureTask.java @@ -163,9 +163,7 @@ public Task resolve(Project project, Config config) { // Bytecode sources will include original input sources // as well as generated input when the jar was built input(p, OutputTypes.BYTECODE) - )) - // Removing any duplicate dependencies that would otherwise trigger unjustified duplicate paths detection in Closure - .distinct(); + )); Stream jsFromJsZips = scope(project.getDependencies(), Dependency.Scope.RUNTIME) .stream()