use of org.gradle.internal.resource.connector.ResourceConnectorSpecification in project gradle by gradle.
the class RepositoryTransportFactory method createTransport.
public RepositoryTransport createTransport(Set<String> schemes, String name, Collection<Authentication> authentications) {
validateSchemes(schemes);
ResourceConnectorFactory connectorFactory = findConnectorFactory(schemes);
// Ensure resource transport protocol, authentication types and credentials are all compatible
validateConnectorFactoryCredentials(schemes, connectorFactory, authentications);
// 2) we don't do progress logging for "downloading"
if (schemes.equals(Collections.singleton("file"))) {
return new FileTransport(name, fileRepository, cachedExternalResourceIndex, temporaryFileProvider, timeProvider, cacheLockingManager, producerGuard);
}
ResourceConnectorSpecification connectionDetails = new DefaultResourceConnectorSpecification(authentications);
ExternalResourceConnector resourceConnector = connectorFactory.createResourceConnector(connectionDetails);
resourceConnector = startParameterResolutionOverride.overrideExternalResourceConnnector(resourceConnector);
ExternalResourceCachePolicy cachePolicy = new DefaultExternalResourceCachePolicy();
cachePolicy = startParameterResolutionOverride.overrideExternalResourceCachePolicy(cachePolicy);
return new ResourceConnectorRepositoryTransport(name, progressLoggerFactory, temporaryFileProvider, cachedExternalResourceIndex, timeProvider, cacheLockingManager, resourceConnector, buildOperationExecutor, cachePolicy, producerGuard, fileRepository);
}
use of org.gradle.internal.resource.connector.ResourceConnectorSpecification in project gradle by gradle.
the class RepositoryTransportFactory method createTransport.
public RepositoryTransport createTransport(Set<String> schemes, String name, Collection<Authentication> authentications, HttpRedirectVerifier redirectVerifier) {
validateSchemes(schemes);
ResourceConnectorFactory connectorFactory = findConnectorFactory(schemes);
// Ensure resource transport protocol, authentication types and credentials are all compatible
validateConnectorFactoryCredentials(schemes, connectorFactory, authentications);
// 2) we don't do progress logging for "downloading"
if (schemes.equals(Collections.singleton("file"))) {
return createFileTransport(name);
}
ResourceConnectorSpecification connectionDetails = new DefaultResourceConnectorSpecification(authentications, redirectVerifier);
ExternalResourceConnector resourceConnector = connectorFactory.createResourceConnector(connectionDetails);
resourceConnector = startParameterResolutionOverride.overrideExternalResourceConnector(resourceConnector);
ExternalResourceCachePolicy cachePolicy = new DefaultExternalResourceCachePolicy();
cachePolicy = startParameterResolutionOverride.overrideExternalResourceCachePolicy(cachePolicy);
return new ResourceConnectorRepositoryTransport(name, temporaryFileProvider, cachedExternalResourceIndex, timeProvider, artifactCacheLockingManager, resourceConnector, buildOperationExecutor, cachePolicy, producerGuard, fileRepository, checksumService);
}
Aggregations