Would calling `dependencyJars.distinct()` be sufficient?