Package org.gradle.api.internal.artifacts

Examples of org.gradle.api.internal.artifacts.CachingDependencyResolveContext


    public Set<File> resolve() {
        return resolve(true);
    }

    public Set<File> resolve(boolean transitive) {
        CachingDependencyResolveContext context = new CachingDependencyResolveContext(transitive);
        context.add(this);
        return context.resolve().getFiles();
    }
View Full Code Here


    public ResolvedConfiguration resolve(final Configuration configuration, Ivy ivy, ModuleDescriptor moduleDescriptor) {
        final ResolvedConfiguration resolvedConfiguration = resolver.resolve(configuration, ivy, moduleDescriptor);
        final Set<DependencyInternal> dependencies = configuration.getAllDependencies(DependencyInternal.class);

        return new ResolvedConfiguration() {
            private final CachingDependencyResolveContext resolveContext = new CachingDependencyResolveContext(configuration.isTransitive());

            public Set<File> getFiles(Spec<Dependency> dependencySpec) {
                Set<File> files = new LinkedHashSet<File>();

                Set<DependencyInternal> selectedDependencies = Specs.filterIterable(dependencies, dependencySpec);
                for (DependencyInternal dependency : selectedDependencies) {
                    resolveContext.add(dependency);
                }
                files.addAll(resolveContext.resolve().getFiles());
                files.addAll(resolvedConfiguration.getFiles(dependencySpec));
                return files;
            }

            public Set<ResolvedArtifact> getResolvedArtifacts() {
View Full Code Here

    public Set<File> resolve() {
        return resolve(true);
    }

    public Set<File> resolve(boolean transitive) {
        CachingDependencyResolveContext context = new CachingDependencyResolveContext(transitive);
        context.add(this);
        return context.resolve().getFiles();
    }
View Full Code Here

                        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));
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.internal.artifacts.CachingDependencyResolveContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.