Search in sources :

Example 6 with IvyPublicationInternal

use of org.gradle.api.publish.ivy.internal.publication.IvyPublicationInternal in project gradle by gradle.

the class PublishToIvyRepository method publish.

@TaskAction
public void publish() {
    IvyPublicationInternal publicationInternal = getPublicationInternal();
    if (publicationInternal == null) {
        throw new InvalidUserDataException("The 'publication' property is required");
    }
    IvyArtifactRepository repository = getRepository();
    if (repository == null) {
        throw new InvalidUserDataException("The 'repository' property is required");
    }
    getDuplicatePublicationTracker().checkCanPublish(publicationInternal, repository.getUrl(), repository.getName());
    doPublish(publicationInternal, repository);
}
Also used : IvyPublicationInternal(org.gradle.api.publish.ivy.internal.publication.IvyPublicationInternal) InvalidUserDataException(org.gradle.api.InvalidUserDataException) IvyArtifactRepository(org.gradle.api.artifacts.repositories.IvyArtifactRepository) TaskAction(org.gradle.api.tasks.TaskAction)

Aggregations

IvyPublicationInternal (org.gradle.api.publish.ivy.internal.publication.IvyPublicationInternal)6 IvyPublication (org.gradle.api.publish.ivy.IvyPublication)5 Action (org.gradle.api.Action)2 XmlProvider (org.gradle.api.XmlProvider)2 IvyArtifactRepository (org.gradle.api.artifacts.repositories.IvyArtifactRepository)2 IvyArtifact (org.gradle.api.publish.ivy.IvyArtifact)2 IvyModuleDescriptorSpec (org.gradle.api.publish.ivy.IvyModuleDescriptorSpec)2 IvyPublicationIdentity (org.gradle.api.publish.ivy.internal.publisher.IvyPublicationIdentity)2 MavenPublication (org.gradle.api.publish.maven.MavenPublication)2 MavenPublicationInternal (org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal)2 Attr (org.w3c.dom.Attr)2 Document (org.w3c.dom.Document)2 Element (org.w3c.dom.Element)2 Node (org.w3c.dom.Node)2 File (java.io.File)1 List (java.util.List)1 Set (java.util.Set)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 Inject (javax.inject.Inject)1 QName (javax.xml.namespace.QName)1