Search in sources :

Example 6 with DependencyArtifact

use of org.gradle.api.artifacts.DependencyArtifact in project gradle by gradle.

the class AbstractIvyDependencyDescriptorFactory method convertArtifacts.

protected List<IvyArtifactName> convertArtifacts(Set<DependencyArtifact> dependencyArtifacts) {
    if (dependencyArtifacts.isEmpty()) {
        return Collections.emptyList();
    }
    ImmutableList.Builder<IvyArtifactName> names = ImmutableList.builder();
    for (DependencyArtifact dependencyArtifact : dependencyArtifacts) {
        DefaultIvyArtifactName name = new DefaultIvyArtifactName(dependencyArtifact.getName(), dependencyArtifact.getType(), getExtension(dependencyArtifact), dependencyArtifact.getClassifier());
        names.add(name);
    }
    return names.build();
}
Also used : DefaultIvyArtifactName(org.gradle.internal.component.model.DefaultIvyArtifactName) DependencyArtifact(org.gradle.api.artifacts.DependencyArtifact) ImmutableList(com.google.common.collect.ImmutableList) IvyArtifactName(org.gradle.internal.component.model.IvyArtifactName) DefaultIvyArtifactName(org.gradle.internal.component.model.DefaultIvyArtifactName)

Aggregations

DependencyArtifact (org.gradle.api.artifacts.DependencyArtifact)6 ExcludeRule (org.gradle.api.artifacts.ExcludeRule)2 ModuleVersionIdentifier (org.gradle.api.artifacts.ModuleVersionIdentifier)2 ImmutableList (com.google.common.collect.ImmutableList)1 ArrayList (java.util.ArrayList)1 ExternalDependency (org.gradle.api.artifacts.ExternalDependency)1 ModuleDependency (org.gradle.api.artifacts.ModuleDependency)1 ProjectDependency (org.gradle.api.artifacts.ProjectDependency)1 DefaultExcludeRule (org.gradle.api.internal.artifacts.DefaultExcludeRule)1 DefaultModuleVersionIdentifier (org.gradle.api.internal.artifacts.DefaultModuleVersionIdentifier)1 VariantVersionMappingStrategyInternal (org.gradle.api.publish.internal.versionmapping.VariantVersionMappingStrategyInternal)1 IvyDependencyInternal (org.gradle.api.publish.ivy.internal.dependency.IvyDependencyInternal)1 IvyExcludeRule (org.gradle.api.publish.ivy.internal.dependency.IvyExcludeRule)1 DefaultMavenDependency (org.gradle.api.publish.maven.internal.dependencies.DefaultMavenDependency)1 DefaultIvyArtifactName (org.gradle.internal.component.model.DefaultIvyArtifactName)1 IvyArtifactName (org.gradle.internal.component.model.IvyArtifactName)1 Test (org.junit.Test)1