@Mutate void addConfiguredPublicationsToProjectPublicationRegistry(ProjectPublicationRegistry projectPublicationRegistry, PublishingExtension extension, ProjectIdentifier projectIdentifier) { for (Publication publication : extension.getPublications()) { PublicationInternal internalPublication = (PublicationInternal) publication; projectPublicationRegistry.registerPublication(projectIdentifier.getPath(), new DefaultProjectPublication(internalPublication.getCoordinates())); } }
public static List<DefaultMavenPublication> getMavenPublications(Project project) { List<DefaultMavenPublication> xdeps = new ArrayList<>(); PublishingExtension publishingExtension = getPublishingExtension(project); if (publishingExtension != null) { PublicationContainer publicationContainer = publishingExtension.getPublications(); for (Publication publication : publicationContainer) { xdeps.add((DefaultMavenPublication)publication); } } return xdeps; }
public DefaultPublicationContainer(Instantiator instantiator) { super(Publication.class, instantiator); }
@Override protected void handleAttemptToAddItemWithNonUniqueName(Publication o) { throw new InvalidUserDataException(String.format("Publication with name '%s' added multiple times", o.getName())); }
protected PublishOperation(Publication publication, String repository) { this.publication = publication; this.repository = repository; }
protected PublishOperation(Publication publication, ArtifactRepository repository) { this.publication = publication; this.repository = repository; }