Search in sources :

Example 6 with IvyArtifact

use of org.gradle.api.publish.ivy.IvyArtifact in project gradle by gradle.

the class IvyDescriptorFileGenerator method writePublications.

private void writePublications(OptionalAttributeXmlWriter xmlWriter) throws IOException {
    xmlWriter.startElement("publications");
    for (IvyArtifact artifact : artifacts) {
        xmlWriter.startElement("artifact").attribute("name", artifact.getName()).attribute("type", artifact.getType()).attribute("ext", artifact.getExtension()).attribute("conf", artifact.getConf()).attribute("m:classifier", artifact.getClassifier()).endElement();
    }
    xmlWriter.endElement();
}
Also used : IvyArtifact(org.gradle.api.publish.ivy.IvyArtifact)

Example 7 with IvyArtifact

use of org.gradle.api.publish.ivy.IvyArtifact in project gradle by gradle.

the class ValidatingIvyPublisher method checkNoDuplicateArtifacts.

private void checkNoDuplicateArtifacts(IvyNormalizedPublication publication) {
    Set<IvyArtifact> verified = new HashSet<IvyArtifact>();
    for (final IvyArtifact artifact : publication.getArtifacts()) {
        checkNotDuplicate(publication, verified, artifact.getName(), artifact.getExtension(), artifact.getType(), artifact.getClassifier());
        verified.add(artifact);
    }
    // Check that ivy.xml isn't duplicated
    checkNotDuplicate(publication, verified, "ivy", "xml", "xml", null);
}
Also used : IvyArtifact(org.gradle.api.publish.ivy.IvyArtifact) HashSet(java.util.HashSet)

Aggregations

IvyArtifact (org.gradle.api.publish.ivy.IvyArtifact)7 File (java.io.File)1 HashSet (java.util.HashSet)1 ModuleComponentIdentifier (org.gradle.api.artifacts.component.ModuleComponentIdentifier)1 ModuleVersionPublisher (org.gradle.api.internal.artifacts.ModuleVersionPublisher)1 IvyConfiguration (org.gradle.api.publish.ivy.IvyConfiguration)1 IvyDependencyInternal (org.gradle.api.publish.ivy.internal.dependency.IvyDependencyInternal)1 IvyModuleDescriptorSpecInternal (org.gradle.api.publish.ivy.internal.publication.IvyModuleDescriptorSpecInternal)1 IvyDescriptorFileGenerator (org.gradle.api.publish.ivy.internal.publisher.IvyDescriptorFileGenerator)1 TaskAction (org.gradle.api.tasks.TaskAction)1 DefaultIvyModulePublishMetadata (org.gradle.internal.component.external.ivypublish.DefaultIvyModulePublishMetadata)1 DefaultModuleComponentIdentifier (org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier)1 DefaultIvyArtifactName (org.gradle.internal.component.model.DefaultIvyArtifactName)1 IvyArtifactName (org.gradle.internal.component.model.IvyArtifactName)1