public ResolvedConfiguration resolve(final Configuration configuration, Ivy ivy, ModuleDescriptor moduleDescriptor) {
final ResolvedConfiguration resolvedConfiguration = resolver.resolve(configuration, ivy, moduleDescriptor);
final Set<DependencyInternal> dependencies = configuration.getAllDependencies(DependencyInternal.class);
return new ResolvedConfiguration() {
private final CachingDependencyResolveContext resolveContext = new CachingDependencyResolveContext(configuration.isTransitive());
public Set<File> getFiles(Spec<Dependency> dependencySpec) {
Set<File> files = new LinkedHashSet<File>();
Set<DependencyInternal> selectedDependencies = Specs.filterIterable(dependencies, dependencySpec);
for (DependencyInternal dependency : selectedDependencies) {
resolveContext.add(dependency);
}
files.addAll(resolveContext.resolve().getFiles());
files.addAll(resolvedConfiguration.getFiles(dependencySpec));
return files;
}
public Set<ResolvedArtifact> getResolvedArtifacts() {