use of org.gradle.api.internal.artifacts.repositories.resolver.MetadataFetchingCost in project gradle by gradle.
the class RepositoryChainComponentMetaDataResolver method isFetchingMetadataCheap.
@Override
public boolean isFetchingMetadataCheap(ComponentIdentifier identifier) {
if (identifier instanceof ModuleComponentIdentifier) {
for (ModuleComponentRepository repository : repositories) {
ModuleComponentRepositoryAccess localAccess = repository.getLocalAccess();
MetadataFetchingCost fetchingCost = localAccess.estimateMetadataFetchingCost((ModuleComponentIdentifier) identifier);
if (fetchingCost.isFast()) {
return true;
} else if (fetchingCost.isExpensive()) {
return false;
}
}
}
return true;
}
Aggregations