use of org.gradle.internal.resource.ExternalResourceRepository in project gradle by gradle.
the class MavenRemotePublisher method publish.
@Override
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
URI repositoryUrl = artifactRepository.getUrl();
LOGGER.info("Publishing to repository '{}' ({})", artifactRepository.getName(), repositoryUrl);
String protocol = repositoryUrl.getScheme().toLowerCase();
DefaultMavenArtifactRepository realRepository = (DefaultMavenArtifactRepository) artifactRepository;
RepositoryTransport transport = realRepository.getTransport(protocol);
ExternalResourceRepository repository = transport.getRepository();
publish(publication, repository, repositoryUrl, false);
}
use of org.gradle.internal.resource.ExternalResourceRepository in project gradle by gradle.
the class MavenLocalPublisher method publish.
@Override
public void publish(MavenNormalizedPublication publication, @Nullable MavenArtifactRepository artifactRepository) {
LOGGER.info("Publishing to maven local repository");
URI rootUri = mavenRepositoryLocator.getLocalMavenRepository().toURI();
RepositoryTransport transport = repositoryTransportFactory.createFileTransport("mavenLocal");
ExternalResourceRepository repository = transport.getRepository();
publish(publication, repository, rootUri, true);
}
use of org.gradle.internal.resource.ExternalResourceRepository 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);
}
Aggregations