Java 类org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository 实例源码

项目:Reer    文件:SourceSetDependencyResolvingClasspath.java   
public SourceSetDependencyResolvingClasspath(
    BinarySpecInternal binarySpec,
    LanguageSourceSet sourceSet,
    Iterable<DependencySpec> dependencies,
    ArtifactDependencyResolver dependencyResolver,
    VariantsMetaData binaryVariants,
    List<ResolutionAwareRepository> remoteRepositories, AttributesSchema attributesSchema) {
    super(binarySpec,
        "source set '" + sourceSet.getDisplayName() + "'",
        dependencyResolver,
        remoteRepositories,
        new JvmLibraryResolveContext(binarySpec.getId(), binaryVariants, dependencies, UsageKind.API, sourceSet.getDisplayName()), attributesSchema);
}
项目:Reer    文件:DependencyResolvingClasspath.java   
public DependencyResolvingClasspath(
    BinarySpecInternal binarySpec,
    String descriptor,
    ArtifactDependencyResolver dependencyResolver,
    List<ResolutionAwareRepository> remoteRepositories,
    ResolveContext resolveContext,
    AttributesSchema attributesSchema) {
    this.binary = binarySpec;
    this.descriptor = descriptor;
    this.dependencyResolver = dependencyResolver;
    this.remoteRepositories = remoteRepositories;
    this.resolveContext = resolveContext;
    this.attributesSchema = attributesSchema;
}
项目:Reer    文件:CacheLockingArtifactDependencyResolver.java   
@Override
public void resolve(final ResolveContext resolveContext, final List<? extends ResolutionAwareRepository> repositories, final GlobalDependencyResolutionRules metadataHandler, final Spec<? super DependencyMetadata> edgeFilter, final DependencyGraphVisitor graphVisitor, final DependencyArtifactsVisitor artifactsVisitor, final AttributesSchema attributesSchema) {
    lockingManager.useCache("resolve " + resolveContext, new Runnable() {
        public void run() {
            resolver.resolve(resolveContext, repositories, metadataHandler, edgeFilter, graphVisitor, artifactsVisitor, attributesSchema);
        }
    });
}
项目:Reer    文件:DefaultConfigurationResolver.java   
@Override
public void resolveBuildDependencies(ConfigurationInternal configuration, ResolverResults result) {
    FileDependencyCollectingGraphVisitor fileDependenciesVisitor = new FileDependencyCollectingGraphVisitor();
    DefaultResolvedArtifactsBuilder artifactsVisitor = new DefaultResolvedArtifactsBuilder(buildProjectDependencies);
    resolver.resolve(configuration, ImmutableList.<ResolutionAwareRepository>of(), metadataHandler, IS_LOCAL_EDGE, fileDependenciesVisitor, artifactsVisitor, attributesSchema);
    ArtifactTransformer transformer = new ArtifactTransformer(configuration.getResolutionStrategy(), attributesSchema);
    result.graphResolved(new BuildDependenciesOnlyVisitedArtifactSet(artifactsVisitor.complete(), fileDependenciesVisitor, transformer));
}
项目:Reer    文件:DefaultConfigurationResolver.java   
public void resolveGraph(ConfigurationInternal configuration, ResolverResults results) {
    List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class));
    StoreSet stores = storeFactory.createStoreSet();

    BinaryStore oldModelStore = stores.nextBinaryStore();
    Store<TransientConfigurationResults> oldModelCache = stores.oldModelCache();
    TransientConfigurationResultsBuilder oldTransientModelBuilder = new TransientConfigurationResultsBuilder(oldModelStore, oldModelCache);
    DefaultResolvedConfigurationBuilder oldModelBuilder = new DefaultResolvedConfigurationBuilder(oldTransientModelBuilder);
    ResolvedConfigurationDependencyGraphVisitor oldModelVisitor = new ResolvedConfigurationDependencyGraphVisitor(oldModelBuilder);

    BinaryStore newModelStore = stores.nextBinaryStore();
    Store<ResolvedComponentResult> newModelCache = stores.newModelCache();
    StreamingResolutionResultBuilder newModelBuilder = new StreamingResolutionResultBuilder(newModelStore, newModelCache);

    ResolvedLocalComponentsResultGraphVisitor localComponentsVisitor = new ResolvedLocalComponentsResultGraphVisitor();

    DefaultResolvedArtifactsBuilder artifactsBuilder = new DefaultResolvedArtifactsBuilder(buildProjectDependencies);
    FileDependencyCollectingGraphVisitor fileDependencyVisitor = new FileDependencyCollectingGraphVisitor();

    DependencyGraphVisitor graphVisitor = new CompositeDependencyGraphVisitor(oldModelVisitor, newModelBuilder, localComponentsVisitor, fileDependencyVisitor);
    DependencyArtifactsVisitor artifactsVisitor = new CompositeDependencyArtifactsVisitor(oldModelVisitor, artifactsBuilder);

    resolver.resolve(configuration, resolutionAwareRepositories, metadataHandler, Specs.<DependencyMetadata>satisfyAll(), graphVisitor, artifactsVisitor, attributesSchema);

    ArtifactTransformer transformer = new ArtifactTransformer(configuration.getResolutionStrategy(), attributesSchema);
    VisitedArtifactsResults artifactsResults = artifactsBuilder.complete();
    results.graphResolved(newModelBuilder.complete(), localComponentsVisitor, new BuildDependenciesOnlyVisitedArtifactSet(artifactsResults, fileDependencyVisitor, transformer));

    results.retainState(new ArtifactResolveState(oldModelBuilder.complete(), artifactsResults, fileDependencyVisitor, oldTransientModelBuilder));
}
项目:Reer    文件:DefaultArtifactDependencyResolver.java   
@Override
public void resolve(ResolveContext resolveContext, List<? extends ResolutionAwareRepository> repositories, GlobalDependencyResolutionRules metadataHandler, Spec<? super DependencyMetadata> edgeFilter, DependencyGraphVisitor graphVisitor, DependencyArtifactsVisitor artifactsVisitor, AttributesSchema attributesSchema) {
    LOGGER.debug("Resolving {}", resolveContext);
    ComponentResolvers resolvers = createResolvers(resolveContext, repositories, metadataHandler);
    DependencyGraphBuilder builder = createDependencyGraphBuilder(resolvers, resolveContext.getResolutionStrategy(), metadataHandler, edgeFilter, attributesSchema);

    ArtifactResolver artifactResolver = new ErrorHandlingArtifactResolver(new CacheLockingArtifactResolver(cacheLockingManager, resolvers.getArtifactResolver()));
    DependencyGraphVisitor artifactsGraphVisitor = new ResolvedArtifactsGraphVisitor(artifactsVisitor, artifactResolver);

    // Resolve the dependency graph
    builder.resolve(resolveContext, new CompositeDependencyGraphVisitor(graphVisitor, artifactsGraphVisitor));
}
项目:Reer    文件:DefaultArtifactDependencyResolver.java   
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);
}
项目:Reer    文件:ArtifactDependencyResolver.java   
void resolve(ResolveContext resolveContext,
List<? extends ResolutionAwareRepository> repositories,
GlobalDependencyResolutionRules metadataHandler,
Spec<? super DependencyMetadata> edgeFilter,
DependencyGraphVisitor graphVisitor,
DependencyArtifactsVisitor artifactsVisitor,
AttributesSchema attributesSchema);
项目:Reer    文件:JavaLanguagePlugin.java   
private static SourceSetDependencyResolvingClasspath classpathFor(BinarySpec binary, JavaSourceSet javaSourceSet, ServiceRegistry serviceRegistry, ModelSchemaStore schemaStore) {
    Iterable<DependencySpec> dependencies = compileDependencies(binary, javaSourceSet);

    ArtifactDependencyResolver dependencyResolver = serviceRegistry.get(ArtifactDependencyResolver.class);
    RepositoryHandler repositories = serviceRegistry.get(RepositoryHandler.class);
    List<ResolutionAwareRepository> resolutionAwareRepositories = collect(repositories, Transformers.cast(ResolutionAwareRepository.class));
    ModelSchema<? extends BinarySpec> schema = schemaStore.getSchema(((BinarySpecInternal) binary).getPublicType());
    VariantsMetaData variantsMetaData = DefaultVariantsMetaData.extractFrom(binary, schema);
    AttributesSchema attributesSchema = serviceRegistry.get(AttributesSchema.class);
    return new SourceSetDependencyResolvingClasspath((BinarySpecInternal) binary, javaSourceSet, dependencies, dependencyResolver, variantsMetaData, resolutionAwareRepositories, attributesSchema);
}
项目:Reer    文件:JvmTestSuiteBasePlugin.java   
@Finalize
public void configureRuntimeClasspath(@Each JvmTestSuiteBinarySpecInternal testBinary, ServiceRegistry serviceRegistry, ModelSchemaStore modelSchemaStore) {
    ArtifactDependencyResolver dependencyResolver = serviceRegistry.get(ArtifactDependencyResolver.class);
    RepositoryHandler repositories = serviceRegistry.get(RepositoryHandler.class);
    List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class));
    ModelSchema<? extends JvmTestSuiteBinarySpec> schema = Cast.uncheckedCast(modelSchemaStore.getSchema(((BinarySpecInternal) testBinary).getPublicType()));
    AttributesSchema attributesSchema = serviceRegistry.get(AttributesSchema.class);
    testBinary.setRuntimeClasspath(configureRuntimeClasspath(testBinary, dependencyResolver, resolutionAwareRepositories, schema, attributesSchema));
}
项目:Pushjet-Android    文件:CacheLockingArtifactDependencyResolver.java   
public void resolve(final ConfigurationInternal configuration,
                               final List<? extends ResolutionAwareRepository> repositories,
                               final GlobalDependencyResolutionRules metadataHandler,
                               final ResolverResults results) throws ResolveException {
    lockingManager.useCache(String.format("resolve %s", configuration), new Runnable() {
        public void run() {
            resolver.resolve(configuration, repositories, metadataHandler, results);
        }
    });
}
项目:Pushjet-Android    文件:ErrorHandlingArtifactDependencyResolver.java   
public void resolve(ConfigurationInternal configuration,
                    List<? extends ResolutionAwareRepository> repositories,
                    GlobalDependencyResolutionRules metadataHandler,
                    ResolverResults results) throws ResolveException {
    try {
        dependencyResolver.resolve(configuration, repositories, metadataHandler, results);
    } catch (final Throwable e) {
        results.failed(new BrokenResolvedConfiguration(e, configuration), wrapException(e, configuration));
        return;
    }
    ResolvedConfiguration wrappedConfiguration = new ErrorHandlingResolvedConfiguration(results.getResolvedConfiguration(), configuration);
    ResolutionResult wrappedResult = new ErrorHandlingResolutionResult(results.getResolutionResult(), configuration);
    results.resolved(wrappedConfiguration, wrappedResult);
}
项目:Pushjet-Android    文件:SelfResolvingDependencyResolver.java   
public void resolve(ConfigurationInternal configuration,
                    List<? extends ResolutionAwareRepository> repositories,
                    GlobalDependencyResolutionRules metadataHandler,
                    ResolverResults results) throws ResolveException {
    resolver.resolve(configuration, repositories, metadataHandler, results);
    ResolvedConfiguration resolvedConfiguration = results.getResolvedConfiguration();
    Set<Dependency> dependencies = configuration.getAllDependencies();
    CachingDependencyResolveContext resolveContext = new CachingDependencyResolveContext(configuration.isTransitive());
    SelfResolvingFilesProvider provider = new SelfResolvingFilesProvider(resolveContext, dependencies);

    results.withResolvedConfiguration(new FilesAggregatingResolvedConfiguration(resolvedConfiguration, provider));
}
项目:Pushjet-Android    文件:ShortcircuitEmptyConfigsArtifactDependencyResolver.java   
public void resolve(ConfigurationInternal configuration,
                    List<? extends ResolutionAwareRepository> repositories,
                    GlobalDependencyResolutionRules metadataHandler,
                    ResolverResults results) throws ResolveException {
    if (configuration.getAllDependencies().isEmpty()) {
        ModuleVersionIdentifier id = DefaultModuleVersionIdentifier.newId(configuration.getModule());
        ComponentIdentifier componentIdentifier = componentIdentifierFactory.createComponentIdentifier(configuration.getModule());
        ResolutionResult emptyResult = new DefaultResolutionResultBuilder().start(id, componentIdentifier).complete();
        results.resolved(new EmptyResolvedConfiguration(), emptyResult);
    } else {
        dependencyResolver.resolve(configuration, repositories, metadataHandler, results);
    }
}
项目:Pushjet-Android    文件:DefaultArtifactResolutionQuery.java   
public ArtifactResolutionResult execute() {
    if (componentType == null) {
        throw new IllegalStateException("Must specify component type and artifacts to query.");
    }
    List<ResolutionAwareRepository> repositories = CollectionUtils.collect(repositoryHandler, Transformers.cast(ResolutionAwareRepository.class));
    ConfigurationInternal configuration = configurationContainer.detachedConfiguration();
    final RepositoryChain repositoryChain = ivyFactory.create(configuration, repositories, metadataHandler.getComponentMetadataProcessor());
    final ArtifactResolver artifactResolver = new ErrorHandlingArtifactResolver(repositoryChain.getArtifactResolver());

    return lockingManager.useCache("resolve artifacts", new Factory<ArtifactResolutionResult>() {
        public ArtifactResolutionResult create() {
            Set<ComponentResult> componentResults = Sets.newHashSet();

            for (ComponentIdentifier componentId : componentIds) {
                if (!(componentId instanceof ModuleComponentIdentifier)) {
                    throw new IllegalArgumentException(String.format("Cannot resolve the artifacts for component %s with unsupported type %s.", componentId.getDisplayName(), componentId.getClass().getName()));
                }
                ModuleComponentIdentifier moduleComponentId = (ModuleComponentIdentifier) componentId;
                try {
                    componentResults.add(buildComponentResult(moduleComponentId, repositoryChain, artifactResolver));
                } catch (Throwable t) {
                    componentResults.add(new DefaultUnresolvedComponentResult(moduleComponentId, t));
                }
            }

            return new DefaultArtifactResolutionResult(componentResults);
        }
    });
}
项目:Pushjet-Android    文件:CacheLockingArtifactDependencyResolver.java   
public void resolve(final ConfigurationInternal configuration,
                               final List<? extends ResolutionAwareRepository> repositories,
                               final ModuleMetadataProcessor metadataProcessor,
                               final ResolverResults results) throws ResolveException {
    lockingManager.useCache(String.format("resolve %s", configuration), new Runnable() {
        public void run() {
            resolver.resolve(configuration, repositories, metadataProcessor, results);
        }
    });
}
项目:Pushjet-Android    文件:ErrorHandlingArtifactDependencyResolver.java   
public void resolve(ConfigurationInternal configuration,
                    List<? extends ResolutionAwareRepository> repositories,
                    ModuleMetadataProcessor metadataProcessor,
                    ResolverResults results) throws ResolveException {
    try {
        dependencyResolver.resolve(configuration, repositories, metadataProcessor, results);
    } catch (final Throwable e) {
        results.failed(new BrokenResolvedConfiguration(e, configuration), wrapException(e, configuration));
        return;
    }
    ResolvedConfiguration wrappedConfiguration = new ErrorHandlingResolvedConfiguration(results.getResolvedConfiguration(), configuration);
    ResolutionResult wrappedResult = new ErrorHandlingResolutionResult(results.getResolutionResult(), configuration);
    results.resolved(wrappedConfiguration, wrappedResult);
}
项目:Pushjet-Android    文件:ResolveIvyFactory.java   
public RepositoryChain create(ConfigurationInternal configuration,
                              Iterable<? extends ResolutionAwareRepository> repositories,
                              ModuleMetadataProcessor metadataProcessor) {
    ResolutionRules resolutionRules = configuration.getResolutionStrategy().getResolutionRules();
    CachePolicy cachePolicy = configuration.getResolutionStrategy().getCachePolicy();

    startParameterResolutionOverride.addResolutionRules(resolutionRules);

    UserResolverChain userResolverChain = new UserResolverChain(versionMatcher, latestStrategy);
    RepositoryChain parentLookupResolver = new ParentModuleLookupResolver(userResolverChain, cacheLockingManager);

    for (ResolutionAwareRepository repository : repositories) {
        ConfiguredModuleVersionRepository moduleVersionRepository = repository.createResolver();

        if (moduleVersionRepository instanceof IvyAwareModuleVersionRepository) {
            ivyContextualize((IvyAwareModuleVersionRepository) moduleVersionRepository, userResolverChain, configuration.getName());
        }
        if (moduleVersionRepository instanceof ExternalResourceResolver) {
            ((ExternalResourceResolver) moduleVersionRepository).setRepositoryChain(parentLookupResolver);
        }

        LocalAwareModuleVersionRepository localAwareRepository;
        if (moduleVersionRepository.isLocal()) {
            localAwareRepository = new LocalModuleVersionRepository(moduleVersionRepository, metadataProcessor);
        } else {
            LocalArtifactsModuleVersionRepository wrapperRepository = new CacheLockingModuleVersionRepository(moduleVersionRepository, cacheLockingManager);
            wrapperRepository = startParameterResolutionOverride.overrideModuleVersionRepository(wrapperRepository);
            localAwareRepository = new CachingModuleVersionRepository(wrapperRepository, moduleVersionsCache, moduleMetaDataCache, moduleArtifactsCache, artifactAtRepositoryCachedResolutionIndex,
                    cachePolicy, timeProvider, metadataProcessor, getModuleExtractor(moduleVersionRepository));
        }
        if (moduleVersionRepository.isDynamicResolveMode()) {
            localAwareRepository = new IvyDynamicResolveModuleVersionRepository(localAwareRepository);
        }
        localAwareRepository = inMemoryCache.cached(localAwareRepository);
        userResolverChain.add(localAwareRepository);
    }

    return userResolverChain;
}
项目:Pushjet-Android    文件:SelfResolvingDependencyResolver.java   
public void resolve(ConfigurationInternal configuration,
                    List<? extends ResolutionAwareRepository> repositories,
                    ModuleMetadataProcessor metadataProcessor,
                    ResolverResults results) throws ResolveException {
    resolver.resolve(configuration, repositories, metadataProcessor, results);
    ResolvedConfiguration resolvedConfiguration = results.getResolvedConfiguration();
    Set<Dependency> dependencies = configuration.getAllDependencies();
    CachingDependencyResolveContext resolveContext = new CachingDependencyResolveContext(configuration.isTransitive());
    SelfResolvingFilesProvider provider = new SelfResolvingFilesProvider(resolveContext, dependencies);

    results.withResolvedConfiguration(new FilesAggregatingResolvedConfiguration(resolvedConfiguration, provider));
}
项目:Pushjet-Android    文件:ShortcircuitEmptyConfigsArtifactDependencyResolver.java   
public void resolve(ConfigurationInternal configuration,
                    List<? extends ResolutionAwareRepository> repositories,
                    ModuleMetadataProcessor metadataProcessor,
                    ResolverResults results) throws ResolveException {
    if (configuration.getAllDependencies().isEmpty()) {
        ModuleVersionIdentifier id = DefaultModuleVersionIdentifier.newId(configuration.getModule());
        ComponentIdentifier componentIdentifier = componentIdentifierFactory.createComponentIdentifier(configuration.getModule());
        ResolutionResult emptyResult = new DefaultResolutionResultBuilder().start(id, componentIdentifier).complete();
        results.resolved(new EmptyResolvedConfiguration(), emptyResult);
    } else {
        dependencyResolver.resolve(configuration, repositories, metadataProcessor, results);
    }
}
项目:Pushjet-Android    文件:DefaultArtifactResolutionQuery.java   
public ArtifactResolutionQueryResult execute() {
    List<ResolutionAwareRepository> repositories = CollectionUtils.collect(repositoryHandler, Transformers.cast(ResolutionAwareRepository.class));
    ConfigurationInternal configuration = configurationContainer.detachedConfiguration();
    final RepositoryChain repositoryChain = ivyFactory.create(configuration, repositories, metadataProcessor);
    final ArtifactResolver artifactResolver = new ErrorHandlingArtifactResolver(repositoryChain.getArtifactResolver());

    return lockingManager.useCache("resolve artifacts", new Factory<ArtifactResolutionQueryResult>() {
        public ArtifactResolutionQueryResult create() {
            Set<JvmLibrary> jvmLibraries = Sets.newHashSet();
            Set<UnresolvedSoftwareComponent> unresolvedComponents = Sets.newHashSet();

            for (ComponentIdentifier componentId : componentIds) {
                if (!(componentId instanceof ModuleComponentIdentifier)) {
                    throw new IllegalArgumentException(String.format("Cannot resolve the artifacts for component %s with unsupported type %s.", componentId.getDisplayName(), componentId.getClass().getName()));
                }
                ModuleComponentIdentifier moduleComponentId = (ModuleComponentIdentifier) componentId;
                BuildableComponentResolveResult moduleResolveResult = new DefaultBuildableComponentResolveResult();
                repositoryChain.getDependencyResolver().resolve(new DefaultDependencyMetaData(new DefaultDependencyDescriptor(toModuleRevisionId(moduleComponentId), true)), moduleResolveResult);

                try {
                    DefaultJvmLibrary jvmLibrary = buildJvmLibrary(moduleResolveResult.getMetaData(), artifactResolver);
                    jvmLibraries.add(jvmLibrary);
                } catch (Throwable t) {
                    unresolvedComponents.add(new DefaultUnresolvedSoftwareComponent(moduleComponentId, t));
                }
            }

            return new DefaultArtifactResolutionQueryResult(jvmLibraries, unresolvedComponents);
        }
    });
}
项目:Pushjet-Android    文件:FixedResolverArtifactRepository.java   
public ConfiguredModuleVersionRepository createResolver() {
    // Handle a repository wrapped in a resolver for backwards compatibility
    if (resolver instanceof ResolutionAwareRepository) {
        ResolutionAwareRepository resolutionAwareRepository = (ResolutionAwareRepository) resolver;
        return resolutionAwareRepository.createResolver();
    }
    return new IvyDependencyResolverAdapter(resolver);
}
项目:Reer    文件:ResolveIvyFactory.java   
public ComponentResolvers create(ResolutionStrategyInternal resolutionStrategy,
                              Collection<? extends ResolutionAwareRepository> repositories,
                              ComponentMetadataProcessor metadataProcessor) {
    if (repositories.isEmpty()) {
        return new NoRepositoriesResolver();
    }

    ResolutionRules resolutionRules = resolutionStrategy.getResolutionRules();
    CachePolicy cachePolicy = resolutionStrategy.getCachePolicy();

    startParameterResolutionOverride.addResolutionRules(resolutionRules);

    UserResolverChain moduleResolver = new UserResolverChain(versionSelectorScheme, versionComparator, resolutionStrategy.getComponentSelection());
    ParentModuleLookupResolver parentModuleResolver = new ParentModuleLookupResolver(versionSelectorScheme, versionComparator, cacheLockingManager);

    for (ResolutionAwareRepository repository : repositories) {
        ConfiguredModuleComponentRepository baseRepository = repository.createResolver();

        if (baseRepository instanceof ExternalResourceResolver) {
            ((ExternalResourceResolver) baseRepository).setComponentResolvers(parentModuleResolver);
        }

        ModuleComponentRepository moduleComponentRepository = baseRepository;
        if (baseRepository.isLocal()) {
            moduleComponentRepository = new LocalModuleComponentRepository(baseRepository, metadataProcessor);
        } else {
            moduleComponentRepository = new CacheLockReleasingModuleComponentsRepository(moduleComponentRepository, cacheLockingManager);
            moduleComponentRepository = startParameterResolutionOverride.overrideModuleVersionRepository(moduleComponentRepository);
            moduleComponentRepository = new CachingModuleComponentRepository(moduleComponentRepository, moduleVersionsCache, moduleMetaDataCache, moduleArtifactsCache, artifactAtRepositoryCachedResolutionIndex,
                    cachePolicy, timeProvider, metadataProcessor);
        }

        if (baseRepository.isDynamicResolveMode()) {
            moduleComponentRepository = IvyDynamicResolveModuleComponentRepositoryAccess.wrap(moduleComponentRepository);
        }
        moduleComponentRepository = inMemoryCache.cached(moduleComponentRepository);
        moduleComponentRepository = new ErrorHandlingModuleComponentRepository(moduleComponentRepository);

        moduleResolver.add(moduleComponentRepository);
        parentModuleResolver.add(moduleComponentRepository);
    }

    return moduleResolver;
}
项目:Reer    文件:JvmTestSuiteBasePlugin.java   
private static DependencyResolvingClasspath configureRuntimeClasspath(JvmTestSuiteBinarySpecInternal testBinary, ArtifactDependencyResolver dependencyResolver, List<ResolutionAwareRepository> resolutionAwareRepositories, ModelSchema<? extends JvmTestSuiteBinarySpec> schema, AttributesSchema attributesSchema) {
    return new DependencyResolvingClasspath(testBinary, testBinary.getDisplayName(), dependencyResolver, resolutionAwareRepositories, createResolveContext(testBinary, schema), attributesSchema);
}
项目:Pushjet-Android    文件:DefaultConfigurationResolver.java   
public ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException {
    List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class));
    ResolverResults results = new ResolverResults();
    resolver.resolve(configuration, resolutionAwareRepositories, metadataHandler, results);
    return results;
}
项目:Pushjet-Android    文件:ResolveIvyFactory.java   
public RepositoryChain create(ConfigurationInternal configuration,
                              Collection<? extends ResolutionAwareRepository> repositories,
                              ComponentMetadataProcessor metadataProcessor) {
    if (repositories.isEmpty()) {
        return new NoRepositoriesResolver();
    }

    ResolutionStrategyInternal resolutionStrategy = configuration.getResolutionStrategy();
    ResolutionRules resolutionRules = resolutionStrategy.getResolutionRules();
    CachePolicy cachePolicy = resolutionStrategy.getCachePolicy();

    startParameterResolutionOverride.addResolutionRules(resolutionRules);

    UserResolverChain userResolverChain = new UserResolverChain(versionMatcher, latestStrategy, resolutionStrategy.getComponentSelection());
    RepositoryChain parentLookupResolver = new ParentModuleLookupResolver(userResolverChain, cacheLockingManager);

    for (ResolutionAwareRepository repository : repositories) {
        ConfiguredModuleComponentRepository baseRepository = repository.createResolver();

        if (baseRepository instanceof ExternalResourceResolver) {
            ((ExternalResourceResolver) baseRepository).setRepositoryChain(parentLookupResolver);
        }

        // TODO:DAZ In theory we could update this so that _all_ repositories are wrapped in a cache:
        //     - would need to add local/remote pattern to artifact download
        //     - This might help later when we integrate in-memory caching with file-backed caching.
        ModuleComponentRepository moduleComponentRepository = baseRepository;
        if (baseRepository.isLocal()) {
            moduleComponentRepository = new LocalModuleComponentRepository(baseRepository, metadataProcessor);
        } else {
            moduleComponentRepository = new CacheLockReleasingModuleComponentsRepository(moduleComponentRepository, cacheLockingManager);
            moduleComponentRepository = startParameterResolutionOverride.overrideModuleVersionRepository(moduleComponentRepository);
            moduleComponentRepository = new CachingModuleComponentRepository(moduleComponentRepository, moduleVersionsCache, moduleMetaDataCache, moduleArtifactsCache, artifactAtRepositoryCachedResolutionIndex,
                    cachePolicy, timeProvider, metadataProcessor);
        }

        if (baseRepository.isDynamicResolveMode()) {
            moduleComponentRepository = IvyDynamicResolveModuleComponentRepositoryAccess.wrap(moduleComponentRepository);
        }
        moduleComponentRepository = inMemoryCache.cached(moduleComponentRepository);
        userResolverChain.add(moduleComponentRepository);
    }

    return userResolverChain;
}
项目:Pushjet-Android    文件:ArtifactDependencyResolver.java   
void resolve(ConfigurationInternal configuration,
List<? extends ResolutionAwareRepository> repositories,
GlobalDependencyResolutionRules metadataHandler,
ResolverResults results) throws ResolveException;
项目:Pushjet-Android    文件:DefaultConfigurationResolver.java   
public ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException {
    List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class));
    ResolverResults results = new ResolverResults();
    resolver.resolve(configuration, resolutionAwareRepositories, metadataProcessor, results);
    return results;
}
项目:Pushjet-Android    文件:ArtifactDependencyResolver.java   
void resolve(ConfigurationInternal configuration,
List<? extends ResolutionAwareRepository> repositories,
ModuleMetadataProcessor metadataProcessor,
ResolverResults results) throws ResolveException;