IvyArtifactSet (Gradle API 2.14.1)

org.gradle.api.publish.ivy

## Interface IvyArtifactSet

- All Superinterfaces:
    Collection<IvyArtifact>, DomainObjectCollection<IvyArtifact>, DomainObjectSet<IvyArtifact>, Iterable<IvyArtifact>, Set<IvyArtifact>

      @Incubating
      public interface IvyArtifactSet
      extends DomainObjectSet<IvyArtifact>

  A Collection of `IvyArtifact`s to be included in an `IvyPublication`. Being a `DomainObjectSet`, a `IvyArtifactSet` provides convenient methods for querying, filtering, and applying actions to the set of `IvyArtifact`s.

       apply plugin: 'ivy-publish'

       def publication = publishing.publications.create("my-pub", IvyPublication)
       def artifacts = publication.artifacts

       artifacts.matching({
           it.type == "source"
       }).all({
           it.extension = "src.jar"
       })

  See Also:
    `DomainObjectSet`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IvyArtifact` | `artifact(Object source)` Creates and adds a `IvyArtifact` to the set.
    `IvyArtifact` | `artifact(Object source, Action<? super IvyArtifact> config)` Creates and adds a `IvyArtifact` to the set, which is configured by the associated action.

    - ### Methods inherited from interface org.gradle.api.DomainObjectSet

      `findAll, matching, matching, withType`

    - ### Methods inherited from interface org.gradle.api.DomainObjectCollection

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

    - ### Methods inherited from interface java.util.Set

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

- - ### Method Detail

    - #### artifact

          IvyArtifact artifact(Object source)

      Creates and adds a `IvyArtifact` to the set. The semantics of this method are the same as `IvyPublication.artifact(Object)`.
      Parameters:
        `source` - The source of the artifact content.

    - #### artifact

          IvyArtifact artifact(Object source,
                             Action<? super IvyArtifact> config)

      Creates and adds a `IvyArtifact` to the set, which is configured by the associated action. The semantics of this method are the same as `IvyPublication.artifact(Object, Action)`.
      Parameters:
        `source` - The source of the artifact.
        `config` - An action to configure the values of the constructed `IvyArtifact`.