Search in sources :

Example 1 with DefaultIvyModulePublishMetadata

use of org.gradle.internal.component.external.model.DefaultIvyModulePublishMetadata 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);
    }
}
Also used : DefaultIvyModulePublishMetadata(org.gradle.internal.component.external.model.DefaultIvyModulePublishMetadata) IvyModuleArtifactPublishMetadata(org.gradle.internal.component.external.model.IvyModuleArtifactPublishMetadata) UncheckedIOException(org.gradle.api.UncheckedIOException) IOException(java.io.IOException) UncheckedIOException(org.gradle.api.UncheckedIOException) ModuleVersionPublisher(org.gradle.api.internal.artifacts.ModuleVersionPublisher)

Example 2 with DefaultIvyModulePublishMetadata

use of org.gradle.internal.component.external.model.DefaultIvyModulePublishMetadata in project gradle by gradle.

the class IvyBackedArtifactPublisher method toPublishMetaData.

private BuildableIvyModulePublishMetadata toPublishMetaData(Module module, Set<? extends ConfigurationInternal> configurations) {
    ModuleComponentIdentifier id = DefaultModuleComponentIdentifier.newId(module.getGroup(), module.getName(), module.getVersion());
    DefaultIvyModulePublishMetadata publishMetaData = new DefaultIvyModulePublishMetadata(id, module.getStatus());
    configurationComponentMetaDataBuilder.addConfigurations(publishMetaData, configurations);
    return publishMetaData;
}
Also used : DefaultIvyModulePublishMetadata(org.gradle.internal.component.external.model.DefaultIvyModulePublishMetadata) ModuleComponentIdentifier(org.gradle.api.artifacts.component.ModuleComponentIdentifier) DefaultModuleComponentIdentifier(org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier)

Aggregations

DefaultIvyModulePublishMetadata (org.gradle.internal.component.external.model.DefaultIvyModulePublishMetadata)2 IOException (java.io.IOException)1 UncheckedIOException (org.gradle.api.UncheckedIOException)1 ModuleComponentIdentifier (org.gradle.api.artifacts.component.ModuleComponentIdentifier)1 ModuleVersionPublisher (org.gradle.api.internal.artifacts.ModuleVersionPublisher)1 DefaultModuleComponentIdentifier (org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier)1 IvyModuleArtifactPublishMetadata (org.gradle.internal.component.external.model.IvyModuleArtifactPublishMetadata)1