use of org.gradle.internal.resource.transport.file.FileTransport 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);
}
Aggregations