Collection<File> (ExternalDependency dependency) { if (dependency instanceof ExternalLibraryDependency) { return singleton(((ExternalLibraryDependency)dependency).getFile()); } else if (dependency instanceof FileCollectionDependency) { return ((FileCollectionDependency)dependency).getFiles(); } else if (dependency instanceof ExternalMultiLibraryDependency) { return ((ExternalMultiLibraryDependency)dependency).getFiles(); } else if (dependency instanceof ExternalProjectDependency) { return ((ExternalProjectDependency)dependency).getProjectDependencyArtifacts(); } return emptySet(); }