Search in sources :

Example 1 with IvyModuleArtifactPublishMetadata

use of org.gradle.internal.component.external.ivypublish.IvyModuleArtifactPublishMetadata in project gradle by gradle.

the class AbstractMavenResolver method publish.

public void publish(IvyModulePublishMetadata moduleVersion) {
    for (IvyModuleArtifactPublishMetadata artifactMetadata : moduleVersion.getArtifacts()) {
        IvyArtifactName artifact = artifactMetadata.getArtifactName();
        ModuleRevisionId moduleRevisionId = IvyUtil.createModuleRevisionId(artifactMetadata.getId().getComponentIdentifier());
        Map<String, String> attributes = Collections.singletonMap("classifier", artifact.getClassifier());
        Artifact ivyArtifact = new DefaultArtifact(moduleRevisionId, null, artifact.getName(), artifact.getType(), artifact.getExtension(), attributes);
        collectArtifact(ivyArtifact, artifactMetadata.getFile());
    }
    publish();
}
Also used : IvyModuleArtifactPublishMetadata(org.gradle.internal.component.external.ivypublish.IvyModuleArtifactPublishMetadata) IvyArtifactName(org.gradle.internal.component.model.IvyArtifactName) ModuleRevisionId(org.apache.ivy.core.module.id.ModuleRevisionId) PublishArtifact(org.gradle.api.artifacts.PublishArtifact) Artifact(org.apache.ivy.core.module.descriptor.Artifact) DefaultArtifact(org.apache.ivy.core.module.descriptor.DefaultArtifact) DefaultArtifact(org.apache.ivy.core.module.descriptor.DefaultArtifact)

Aggregations

Artifact (org.apache.ivy.core.module.descriptor.Artifact)1 DefaultArtifact (org.apache.ivy.core.module.descriptor.DefaultArtifact)1 ModuleRevisionId (org.apache.ivy.core.module.id.ModuleRevisionId)1 PublishArtifact (org.gradle.api.artifacts.PublishArtifact)1 IvyModuleArtifactPublishMetadata (org.gradle.internal.component.external.ivypublish.IvyModuleArtifactPublishMetadata)1 IvyArtifactName (org.gradle.internal.component.model.IvyArtifactName)1