Package org.gradle.api.artifacts.result

Examples of org.gradle.api.artifacts.result.ResolvedArtifactResult


        for (ComponentArtifactsResult componentResult : componentResults) {
            for (IdeExtendedRepoFileDependency dependency : dependencies.get(componentResult.getId())) {

                Set<ArtifactResult> sourceArtifacts = componentResult.getArtifacts(SourcesArtifact.class);
                ResolvedArtifactResult closestSourceArtifact = auxiliaryArtifactMatchStrategy.findBestMatch(sourceArtifacts, dependency);
                if (closestSourceArtifact != null) {
                    dependency.setSourceFile(closestSourceArtifact.getFile());
                }

                Set<ArtifactResult> javadocArtifacts = componentResult.getArtifacts(JavadocArtifact.class);
                ResolvedArtifactResult closestJavadocArtifact = auxiliaryArtifactMatchStrategy.findBestMatch(javadocArtifacts, dependency);
                if(closestJavadocArtifact != null){
                    dependency.setJavadocFile(closestJavadocArtifact.getFile());
                }
            }
        }
    }
View Full Code Here


        }
        return null;
    }

    private ResolvedArtifactResult findMatchingArtifactWithShortestName(Set<ResolvedArtifactResult> artifacts, String artifactFileName) {
        ResolvedArtifactResult closestMatchSoFar = null;
        for (ResolvedArtifactResult artifactResult : artifacts) {
            String auxiliaryArtifactFileName = artifactResult.getFile().getName();
            if (auxiliaryArtifactFileNameStartsWithArtifactFileName(auxiliaryArtifactFileName, artifactFileName)) {
                if (closestMatchSoFar == null) {
                    closestMatchSoFar = artifactResult;
View Full Code Here

TOP

Related Classes of org.gradle.api.artifacts.result.ResolvedArtifactResult

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.