use of org.gradle.internal.component.external.descriptor.Artifact in project gradle by gradle.
the class IvyModuleResolveMetaDataBuilder method findOrCreate.
private Artifact findOrCreate(IvyArtifactName artifactName) {
for (Artifact existingArtifact : artifacts) {
if (existingArtifact.getArtifactName().equals(artifactName)) {
return existingArtifact;
}
}
Artifact newArtifact = new Artifact(artifactName);
artifacts.add(newArtifact);
return newArtifact;
}
use of org.gradle.internal.component.external.descriptor.Artifact in project gradle by gradle.
the class IvyModuleResolveMetaDataBuilder method addArtifact.
public void addArtifact(IvyArtifactName newArtifact, Set<String> configurations) {
if (configurations.isEmpty()) {
throw new IllegalArgumentException("Artifact should be attached to at least one configuration.");
}
Artifact artifact = findOrCreate(newArtifact);
artifact.getConfigurations().addAll(configurations);
}
Aggregations