use of org.gradle.internal.hash.FileHasher in project gradle by gradle.
the class DefaultSignatureVerificationServiceFactory method create.
@Override
public SignatureVerificationService create(BuildTreeDefinedKeys keyrings, List<URI> keyServers, boolean useKeyServers) {
boolean refreshKeys = this.refreshKeys || !useKeyServers;
ExternalResourceRepository repository = transportFactory.createTransport("https", "https", Collections.emptyList(), redirectLocations -> {
}).getRepository();
PublicKeyService keyService;
if (useKeyServers) {
PublicKeyDownloadService keyDownloadService = new PublicKeyDownloadService(ImmutableList.copyOf(keyServers), repository);
keyService = new CrossBuildCachingKeyService(cacheRepository, decoratorFactory, buildOperationExecutor, keyDownloadService, timeProvider, refreshKeys);
} else {
keyService = EmptyPublicKeyService.getInstance();
}
keyService = keyrings.applyTo(keyService);
File effectiveKeyringsFile = keyrings.getEffectiveKeyringsFile();
HashCode keyringFileHash = effectiveKeyringsFile != null && effectiveKeyringsFile.exists() ? fileHasher.hash(effectiveKeyringsFile) : NO_KEYRING_FILE_HASH;
DefaultSignatureVerificationService delegate = new DefaultSignatureVerificationService(keyService);
return new CrossBuildSignatureVerificationService(delegate, fileHasher, buildScopedCache, decoratorFactory, timeProvider, refreshKeys, useKeyServers, keyringFileHash);
}
use of org.gradle.internal.hash.FileHasher in project gradle by gradle.
the class DefaultFileOperations method createSimple.
public static DefaultFileOperations createSimple(FileResolver fileResolver, FileCollectionFactory fileTreeFactory, ServiceRegistry services) {
Instantiator instantiator = services.get(Instantiator.class);
ObjectFactory objectFactory = services.get(ObjectFactory.class);
FileSystem fileSystem = services.get(FileSystem.class);
DirectoryFileTreeFactory directoryFileTreeFactory = services.get(DirectoryFileTreeFactory.class);
StreamHasher streamHasher = services.get(StreamHasher.class);
FileHasher fileHasher = services.get(FileHasher.class);
ApiTextResourceAdapter.Factory textResourceAdapterFactory = services.get(ApiTextResourceAdapter.Factory.class);
Factory<PatternSet> patternSetFactory = services.getFactory(PatternSet.class);
Deleter deleter = services.get(Deleter.class);
DocumentationRegistry documentationRegistry = services.get(DocumentationRegistry.class);
ProviderFactory providers = services.get(ProviderFactory.class);
DefaultResourceHandler.Factory resourceHandlerFactory = DefaultResourceHandler.Factory.from(fileResolver, fileSystem, null, textResourceAdapterFactory);
return new DefaultFileOperations(fileResolver, null, instantiator, directoryFileTreeFactory, streamHasher, fileHasher, resourceHandlerFactory, fileTreeFactory, objectFactory, fileSystem, patternSetFactory, deleter, documentationRegistry, providers);
}
Aggregations