use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project MyLuaApp-Build-Core by dingyi222666.
the class DefaultMavenLocalArtifactRepository method createRealResolver.
@Override
protected MavenResolver createRealResolver() {
URI rootUri = validateUrl();
RepositoryTransport transport = getTransport(rootUri.getScheme());
MavenMetadataLoader mavenMetadataLoader = new MavenMetadataLoader(transport.getResourceAccessor(), getResourcesFileStore());
Instantiator injector = createInjectorForMetadataSuppliers(transport, getInstantiatorFactory(), rootUri, getResourcesFileStore());
MavenResolver resolver = new MavenResolver(getName(), rootUri, transport, getLocallyAvailableResourceFinder(), getArtifactFileStore(), createMetadataSources(mavenMetadataLoader), MavenMetadataArtifactProvider.INSTANCE, mavenMetadataLoader, null, null, injector, checksumService);
for (URI repoUrl : getArtifactUrls()) {
resolver.addArtifactLocation(repoUrl);
}
return resolver;
}
use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project gradle by gradle.
the class DependencyManagementBuildScopeServices method createTextResourceLoader.
TextResourceLoader createTextResourceLoader(ExternalResourceFileStore resourceFileStore, RepositoryTransportFactory repositoryTransportFactory) {
HashSet<String> schemas = Sets.newHashSet("https", "http");
RepositoryTransport transport = repositoryTransportFactory.createTransport(schemas, "http auth", Collections.<Authentication>emptyList());
ExternalResourceAccessor externalResourceAccessor = new DefaultExternalResourceAccessor(resourceFileStore, transport.getResourceAccessor());
return new DefaultUriTextResourceLoader(externalResourceAccessor, schemas);
}
use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project MyLuaApp-Build-Core by dingyi222666.
the class DefaultFlatDirArtifactRepository method createRealResolver.
private IvyResolver createRealResolver() {
Set<File> dirs = getDirs();
if (dirs.isEmpty()) {
throw new InvalidUserDataException("You must specify at least one directory for a flat directory repository.");
}
RepositoryTransport transport = transportFactory.createFileTransport(getName());
Instantiator injector = createInjectorForMetadataSuppliers(transport, instantiatorFactory, null, null);
IvyResolver resolver = new IvyResolver(getName(), transport, locallyAvailableResourceFinder, false, artifactFileStore, null, null, createMetadataSources(), IvyMetadataArtifactProvider.INSTANCE, injector, checksumService);
for (File root : dirs) {
resolver.addArtifactLocation(root.toURI(), "/[artifact]-[revision](-[classifier]).[ext]");
resolver.addArtifactLocation(root.toURI(), "/[artifact](-[classifier]).[ext]");
}
return resolver;
}
use of org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport in project gradle by gradle.
the class DefaultFlatDirArtifactRepository method createRealResolver.
private IvyResolver createRealResolver() {
Set<File> dirs = getDirs();
if (dirs.isEmpty()) {
throw new InvalidUserDataException("You must specify at least one directory for a flat directory repository.");
}
RepositoryTransport transport = transportFactory.createFileTransport(getName());
Instantiator injector = createInjectorForMetadataSuppliers(transport, instantiatorFactory, null, null);
IvyResolver resolver = new IvyResolver(getName(), transport, locallyAvailableResourceFinder, false, artifactFileStore, null, null, createMetadataSources(), IvyMetadataArtifactProvider.INSTANCE, injector, checksumService);
for (File root : dirs) {
resolver.addArtifactLocation(root.toURI(), "/[artifact]-[revision](-[classifier]).[ext]");
resolver.addArtifactLocation(root.toURI(), "/[artifact](-[classifier]).[ext]");
}
return resolver;
}
Aggregations