use of org.gradle.api.internal.artifacts.ArtifactPublisher in project gradle by gradle.
the class Upload method upload.
@TaskAction
protected void upload() {
getLogger().info("Publishing configuration: " + configuration);
Module module = ((ConfigurationInternal) configuration).getModule();
ArtifactPublisher artifactPublisher = getPublicationServices().createArtifactPublisher();
File descriptorDestination = isUploadDescriptor() ? getDescriptorDestination() : null;
List<PublicationAwareRepository> publishRepositories = collect(getRepositories(), Transformers.cast(PublicationAwareRepository.class));
try {
artifactPublisher.publish(publishRepositories, module, configuration, descriptorDestination);
} catch (Exception e) {
throw new PublishException(String.format("Could not publish configuration '%s'", configuration.getName()), e);
}
}
Aggregations