use of org.gradle.plugins.ide.internal.resolver.model.UnresolvedIdeRepoFileDependency in project gradle by gradle.
the class DefaultIdeDependencyResolver method getUnresolvedIdeRepoFileDependencies.
/**
* Gets unresolved IDE repository file dependencies.
*
* @param configuration Configuration
* @return Unresolved IDE repositoru file dependencies
*/
public List<UnresolvedIdeRepoFileDependency> getUnresolvedIdeRepoFileDependencies(Configuration configuration) {
ResolutionResult result = getIncomingResolutionResult(configuration);
List<UnresolvedDependencyResult> unresolvedDependencies = findAllUnresolvedDependencyResults(result.getRoot().getDependencies());
List<UnresolvedIdeRepoFileDependency> unresolvedIdeRepoFileDependencies = new ArrayList<UnresolvedIdeRepoFileDependency>();
for (UnresolvedDependencyResult unresolvedDependencyResult : unresolvedDependencies) {
Throwable failure = unresolvedDependencyResult.getFailure();
ComponentSelector componentSelector = unresolvedDependencyResult.getAttempted();
String displayName = componentSelector.getDisplayName();
File file = new File(unresolvedFileName(componentSelector));
unresolvedIdeRepoFileDependencies.add(new UnresolvedIdeRepoFileDependency(file, failure, displayName));
}
return unresolvedIdeRepoFileDependencies;
}
use of org.gradle.plugins.ide.internal.resolver.model.UnresolvedIdeRepoFileDependency in project gradle by gradle.
the class UnresolvedDependenciesLogger method log.
public void log(Collection<UnresolvedIdeRepoFileDependency> deps) {
for (UnresolvedIdeRepoFileDependency dep : deps) {
logger.warn("Could not resolve: " + dep.getDisplayName());
logger.debug("Could not resolve: " + dep.getDisplayName(), dep.getProblem());
}
}
use of org.gradle.plugins.ide.internal.resolver.model.UnresolvedIdeRepoFileDependency in project gradle by gradle.
the class IdeDependenciesExtractor method extractRepoFileDependencies.
public Collection<IdeExtendedRepoFileDependency> extractRepoFileDependencies(DependencyHandler dependencyHandler, Collection<Configuration> plusConfigurations, Collection<Configuration> minusConfigurations, boolean downloadSources, boolean downloadJavadoc) {
// can have multiple IDE dependencies with same component identifier (see GRADLE-1622)
Multimap<ComponentIdentifier, IdeExtendedRepoFileDependency> resolvedDependenciesComponentMap = LinkedHashMultimap.create();
for (IdeExtendedRepoFileDependency dep : resolvedExternalDependencies(plusConfigurations, minusConfigurations)) {
resolvedDependenciesComponentMap.put(toComponentIdentifier(dep.getId()), dep);
}
List<Class<? extends Artifact>> artifactTypes = new ArrayList<Class<? extends Artifact>>(2);
if (downloadSources) {
artifactTypes.add(SourcesArtifact.class);
}
if (downloadJavadoc) {
artifactTypes.add(JavadocArtifact.class);
}
downloadAuxiliaryArtifacts(dependencyHandler, resolvedDependenciesComponentMap, artifactTypes);
Collection<UnresolvedIdeRepoFileDependency> unresolvedDependencies = unresolvedExternalDependencies(plusConfigurations, minusConfigurations);
Collection<IdeExtendedRepoFileDependency> resolvedDependencies = resolvedDependenciesComponentMap.values();
Collection<IdeExtendedRepoFileDependency> resolvedAndUnresolved = new ArrayList<IdeExtendedRepoFileDependency>(unresolvedDependencies.size() + resolvedDependencies.size());
resolvedAndUnresolved.addAll(resolvedDependencies);
resolvedAndUnresolved.addAll(unresolvedDependencies);
return resolvedAndUnresolved;
}
Aggregations