Search in sources :

Example 1 with ResolverProviderFactory

use of org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolverProviderFactory in project gradle by gradle.

the class DefaultArtifactDependencyResolver method createResolvers.

private ComponentResolversChain createResolvers(ResolveContext resolveContext, List<? extends ResolutionAwareRepository> repositories, GlobalDependencyResolutionRules metadataHandler, ArtifactTypeRegistry artifactTypeRegistry) {
    List<ComponentResolvers> resolvers = Lists.newArrayList();
    for (ResolverProviderFactory factory : resolverFactories) {
        if (factory.canCreate(resolveContext)) {
            resolvers.add(factory.create(resolveContext));
        }
    }
    ResolutionStrategyInternal resolutionStrategy = resolveContext.getResolutionStrategy();
    resolvers.add(ivyFactory.create(resolutionStrategy, repositories, metadataHandler.getComponentMetadataProcessor()));
    return new ComponentResolversChain(resolvers, artifactTypeRegistry);
}
Also used : ComponentResolvers(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentResolvers) ResolverProviderFactory(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolverProviderFactory) ResolutionStrategyInternal(org.gradle.api.internal.artifacts.configurations.ResolutionStrategyInternal)

Example 2 with ResolverProviderFactory

use of org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolverProviderFactory in project gradle by gradle.

the class DefaultArtifactDependencyResolver method createResolvers.

private ComponentResolversChain createResolvers(ResolveContext resolveContext, List<? extends ResolutionAwareRepository> repositories, GlobalDependencyResolutionRules metadataHandler, ArtifactTypeRegistry artifactTypeRegistry, AttributesSchema consumerSchema) {
    List<ComponentResolvers> resolvers = Lists.newArrayList();
    for (ResolverProviderFactory factory : resolverFactories) {
        factory.create(resolveContext, resolvers);
    }
    resolvers.add(projectDependencyResolver);
    ResolutionStrategyInternal resolutionStrategy = resolveContext.getResolutionStrategy();
    resolvers.add(ivyFactory.create(resolveContext.getName(), resolutionStrategy, repositories, metadataHandler.getComponentMetadataProcessorFactory(), resolveContext.getAttributes(), consumerSchema, attributesFactory, componentMetadataSupplierRuleExecutor));
    return new ComponentResolversChain(resolvers, artifactTypeRegistry, calculatedValueContainerFactory);
}
Also used : ComponentResolvers(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentResolvers) ResolverProviderFactory(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolverProviderFactory) ResolutionStrategyInternal(org.gradle.api.internal.artifacts.configurations.ResolutionStrategyInternal)

Example 3 with ResolverProviderFactory

use of org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolverProviderFactory in project gradle by gradle.

the class DefaultArtifactDependencyResolver method createResolvers.

private ComponentResolversChain createResolvers(ResolveContext resolveContext, List<? extends ResolutionAwareRepository> repositories, GlobalDependencyResolutionRules metadataHandler) {
    List<ResolverProviderFactory> resolverFactories = allServices(ResolverProviderFactory.class);
    List<ComponentResolvers> resolvers = Lists.newArrayList();
    for (ResolverProviderFactory factory : resolverFactories) {
        if (factory.canCreate(resolveContext)) {
            resolvers.add(factory.create(resolveContext));
        }
    }
    ResolutionStrategyInternal resolutionStrategy = resolveContext.getResolutionStrategy();
    resolvers.add(ivyFactory.create(resolutionStrategy, repositories, metadataHandler.getComponentMetadataProcessor()));
    return new ComponentResolversChain(resolvers);
}
Also used : ComponentResolvers(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentResolvers) ResolverProviderFactory(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolverProviderFactory) ResolutionStrategyInternal(org.gradle.api.internal.artifacts.configurations.ResolutionStrategyInternal)

Aggregations

ResolutionStrategyInternal (org.gradle.api.internal.artifacts.configurations.ResolutionStrategyInternal)3 ComponentResolvers (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentResolvers)3 ResolverProviderFactory (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolverProviderFactory)3