Configuration configuration, LibraryScope scope) {
Set<GradleLibrary> libraries = new LinkedHashSet<GradleLibrary>();
for (Dependency dependency : configuration.getIncoming().getDependencies()) {
if (dependency instanceof FileCollectionDependency) {
FileCollectionDependency fileDependency = (FileCollectionDependency) dependency;
for (File file : fileDependency.resolve()) {
libraries.add(new GradleLibrary(fileDependency.getGroup(), file,
scope));
}
}
else if (dependency instanceof ProjectDependency) {