use of org.gradle.internal.resolve.result.DefaultBuildableComponentArtifactsResolveResult in project gradle by gradle.
the class RepositoryChainArtifactResolver method resolveArtifacts.
@Nullable
@Override
public ArtifactSet resolveArtifacts(ComponentResolveMetadata component, ConfigurationMetadata configuration, ArtifactTypeRegistry artifactTypeRegistry, ModuleExclusion exclusions) {
ModuleComponentRepository sourceRepository = findSourceRepository(component.getSource());
ComponentResolveMetadata unpackedComponent = unpackSource(component);
// First try to determine the artifacts locally before going remote
DefaultBuildableComponentArtifactsResolveResult result = new DefaultBuildableComponentArtifactsResolveResult();
sourceRepository.getLocalAccess().resolveArtifacts(unpackedComponent, result);
if (!result.hasResult()) {
sourceRepository.getRemoteAccess().resolveArtifacts(unpackedComponent, result);
}
if (result.hasResult()) {
return result.getResult().getArtifactsFor(component, configuration, this, sourceRepository.getArtifactCache(), artifactTypeRegistry, exclusions);
}
return null;
}
use of org.gradle.internal.resolve.result.DefaultBuildableComponentArtifactsResolveResult in project gradle by gradle.
the class ResolvedArtifactsGraphVisitor method doResolve.
private Set<? extends VariantMetadata> doResolve(ComponentResolveMetadata component, ConfigurationMetadata configuration) {
BuildableComponentArtifactsResolveResult result = new DefaultBuildableComponentArtifactsResolveResult();
artifactResolver.resolveArtifacts(component, result);
return result.getResult().getVariantsFor(configuration);
}
Aggregations