api / org.gradle.api.publish.maven / MavenArtifactSet

MavenArtifactSet

interface MavenArtifactSet : DomainObjectSet<MavenArtifact>

A Collection of MavenArtifacts to be included in a MavenPublication. Being a DomainObjectSet, a MavenArtifactSet provides convenient methods for querying, filtering, and applying actions to the set of MavenArtifacts.

 apply plugin: 'maven-publish' def publication = publishing.publications.create("name", MavenPublication) def artifacts = publication.artifacts artifacts.matching({ it.classifier == "classy" }).all({ it.extension = "ext" }) 

See Also
DomainObjectSet

Functions

artifact

abstract fun artifact(source: Any): MavenArtifact

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

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

Creates and adds a MavenArtifact to the set, which is configured by the associated action. The semantics of this method are the same as MavenPublication#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}