Package org.gradle.api.artifacts.query

Examples of org.gradle.api.artifacts.query.ArtifactResolutionQuery


    private static void downloadAuxiliaryArtifacts(DependencyHandler dependencyHandler, Multimap<ComponentIdentifier, IdeExtendedRepoFileDependency> dependencies, List<Class<? extends Artifact>> artifactTypes) {
        if (artifactTypes.isEmpty()) {
            return;
        }

        ArtifactResolutionQuery query = dependencyHandler.createArtifactResolutionQuery();
        query.forComponents(dependencies.keySet());

        @SuppressWarnings("unchecked") Class<? extends Artifact>[] artifactTypesArray = (Class<? extends Artifact>[]) new Class<?>[artifactTypes.size()];
        query.withArtifacts(JvmLibrary.class, artifactTypes.toArray(artifactTypesArray));
        Set<ComponentArtifactsResult> componentResults = query.execute().getResolvedComponents();

        AuxiliaryArtifactMatchStrategy auxiliaryArtifactMatchStrategy = new ShortestNameAuxiliaryArtifactMatchStrategy();

        for (ComponentArtifactsResult componentResult : componentResults) {
            for (IdeExtendedRepoFileDependency dependency : dependencies.get(componentResult.getId())) {
View Full Code Here

TOP

Related Classes of org.gradle.api.artifacts.query.ArtifactResolutionQuery

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.