use of org.gradle.internal.component.external.model.IvyModuleArtifactPublishMetadata in project gradle by gradle.
the class DefaultIvyDependencyPublisher method publish.
public void publish(List<ModuleVersionPublisher> publishResolvers, IvyModulePublishMetadata publishMetaData) {
try {
// Make a copy of the publication and filter missing artifacts
DefaultIvyModulePublishMetadata publication = new DefaultIvyModulePublishMetadata(publishMetaData.getId(), publishMetaData.getModuleDescriptor());
for (IvyModuleArtifactPublishMetadata artifact : publishMetaData.getArtifacts()) {
addPublishedArtifact(artifact, publication);
}
for (ModuleVersionPublisher publisher : publishResolvers) {
LOGGER.info("Publishing to {}", publisher);
publisher.publish(publication);
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
use of org.gradle.internal.component.external.model.IvyModuleArtifactPublishMetadata in project gradle by gradle.
the class IvyXmlModuleDescriptorWriter method printPublications.
private static void printPublications(Collection<IvyModuleArtifactPublishMetadata> artifacts, SimpleXmlWriter writer) throws IOException {
writer.startElement("publications");
for (IvyModuleArtifactPublishMetadata artifactMetadata : artifacts) {
IvyArtifactName artifact = artifactMetadata.getArtifactName();
writer.startElement("artifact");
writer.attribute("name", artifact.getName());
writer.attribute("type", artifact.getType());
writer.attribute("ext", artifact.getExtension() == null ? "" : artifact.getExtension());
writer.attribute("conf", Joiner.on(",").join(artifactMetadata.getConfigurations()));
if (artifact.getClassifier() != null) {
printExtraAttributes(Collections.singletonMap("m:classifier", artifact.getClassifier()), writer);
}
writer.endElement();
}
writer.endElement();
}
Aggregations