Search in sources :

Example 1 with ExternalResourceAccessor

use of org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceAccessor 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);
}
Also used : DefaultExternalResourceAccessor(org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceAccessor) DefaultUriTextResourceLoader(org.gradle.internal.resource.transfer.DefaultUriTextResourceLoader) ExternalResourceAccessor(org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceAccessor) DefaultExternalResourceAccessor(org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceAccessor) RepositoryTransport(org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport)

Aggregations

DefaultExternalResourceAccessor (org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceAccessor)1 ExternalResourceAccessor (org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceAccessor)1 RepositoryTransport (org.gradle.api.internal.artifacts.repositories.transport.RepositoryTransport)1 DefaultUriTextResourceLoader (org.gradle.internal.resource.transfer.DefaultUriTextResourceLoader)1