api / org.gradle.api.publish.ivy / IvyArtifactSet

IvyArtifactSet

interface IvyArtifactSet : DomainObjectSet<IvyArtifact>

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

 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

Functions

artifact

abstract fun artifact(source: Any): IvyArtifact

Creates and adds a IvyArtifact to the set. The semantics of this method are the same as IvyPublication#artifact(Object).

abstract fun artifact(source: Any, config: Action<in IvyArtifact>): IvyArtifact

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).

Inherited Functions

findAll

abstract fun findAll(spec: Closure<Any>): MutableSet<T>

{@inheritDoc}

matching

abstract fun matching(spec: Spec<in T>): DomainObjectSet<T>
abstract fun matching(spec: Closure<Any>): DomainObjectSet<T>

{@inheritDoc}

withType

abstract fun <S : T> withType(type: Class<S>): DomainObjectSet<S>

{@inheritDoc}