Table of Contents
API Documentation: | MavenArtifactSet |
---|
A Collection of MavenArtifact
s to be included in a MavenPublication
.
Being a DomainObjectSet
, a MavenArtifactSet
provides convenient methods for querying, filtering, and applying actions to the set of MavenArtifact
s.
plugins { id 'maven-publish' } def publication = publishing.publications.create("name", MavenPublication) def artifacts = publication.artifacts artifacts.matching({ it.classifier == "classy" }).all({ it.extension = "ext" })
Method | Description |
artifact(source) | Creates and adds a |
artifact(source, config) | Creates and adds a |
MavenArtifact
artifact
(Object
source)
Creates and adds a MavenArtifact
to the set.
The semantics of this method are the same as MavenPublication.artifact(java.lang.Object)
.
MavenArtifact
artifact
(Object
source, Action
<? super MavenArtifact
>
config)
Action
<? super 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(java.lang.Object, org.gradle.api.Action)
.