Skip to content

Commit

Permalink
Use a filter instead of minus
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed May 26, 2024
1 parent 9efdc6f commit 808bd0a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ private static void configureTestTAsk(Project project, Test testTask, RunImpl ru
}

private static FileCollection filterOutput(SourceSet srcSet) {
FileCollection collection = srcSet.getRuntimeClasspath().minus(srcSet.getOutput().getClassesDirs());
FileCollection collection = srcSet.getRuntimeClasspath();
if (srcSet.getOutput().getResourcesDir() != null) {
collection = collection.filter(file -> !file.equals(srcSet.getOutput().getResourcesDir()));
}
collection = collection.filter(file -> !srcSet.getOutput().getClassesDirs().contains(file));
return collection;
}

Expand Down

0 comments on commit 808bd0a

Please sign in to comment.