MavenArtifactSet

API Documentation:MavenArtifactSet

Note: This class is incubating and may change in a future version of Gradle.

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"
})

Properties

No properties

Methods

MethodDescription
artifact(source)
Incubating

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

artifact(source, config)
Incubating

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

Script blocks

No script blocks

Method details

MavenArtifact artifact(Object source)

Note: This method is incubating and may change in a future version of Gradle.

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

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

Note: This method is incubating and may change in a future version of Gradle.

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