# Interface PublicationContainer

All Superinterfaces:
  `Collection<Publication>, org.gradle.util.Configurable<NamedDomainObjectContainer<Publication>>, DomainObjectCollection<Publication>, ExtensiblePolymorphicDomainObjectContainer<Publication>, Iterable<Publication>, NamedDomainObjectCollection<Publication>, NamedDomainObjectContainer<Publication>, org.gradle.api.internal.rules.NamedDomainObjectFactoryRegistry<Publication>, NamedDomainObjectSet<Publication>, PolymorphicDomainObjectContainer<Publication>, Set<Publication>`

@Incubating public interface PublicationContainer extends ExtensiblePolymorphicDomainObjectContainer<Publication>
A `PublicationContainer` is responsible for creating and managing `Publication` instances. The set of available publication types is dependent on the application of particular plugins:

- The `MavenPublishPlugin` makes it possible to create `MavenPublication` instances.
- The `IvyPublishPlugin` makes it possible to create `IvyPublication` instances.

    apply plugin: 'ivy-publish'

    publishing.publications.create('publication-name', IvyPublication) {
        // Configure the ivy publication here
    }

The usual way to add publications is via a configuration block. See the documentation for `PublishingExtension.publications(org.gradle.api.Action)` for examples of how to create and configure publications.

Since:
  1.3
See Also:
  - `Publication`
  - `PublishingExtension`

## Method Summary

### Methods inherited from interface Collection

`parallelStream, removeIf, stream, toArray`

### Methods inherited from interface DomainObjectCollection

`all, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType`

### Methods inherited from interface ExtensiblePolymorphicDomainObjectContainer

`registerBinding, registerFactory, registerFactory`

### Methods inherited from interface Iterable

`forEach`

### Methods inherited from interface NamedDomainObjectCollection

`add, addAll, addRule, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getByName, getNamer, getNames, getRules`

### Methods inherited from interface NamedDomainObjectContainer

`configure, create, create, create, maybeCreate`

### Methods inherited from interface NamedDomainObjectSet

`findAll, matching, matching, withType`

### Methods inherited from interface PolymorphicDomainObjectContainer

`containerWithType, create, create, maybeCreate`

### Methods inherited from interface Set

`add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray`