Table of Contents
API Documentation: | MavenArtifactSet |
---|
A Collection ofMavenArtifact
s to be included in aMavenPublication
.Being aDomainObjectSet
, aMavenArtifactSet
provides convenient methods for querying, filtering, and applying actions to the set ofMavenArtifact
s.
plugins { id'maven-publish'}def publication = publishing.publications.create("name", MavenPublication)def artifacts = publication.artifactsartifacts.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 aMavenArtifact
to the set.The semantics of this method are the same asMavenPublication.artifact(java.lang.Object)
.
MavenArtifact
artifact
(Object
source,Action
<? superMavenArtifact
>
config)
Action
<? superMavenArtifact
>Creates and adds aMavenArtifact
to the set, which is configured by the associated action.The semantics of this method are the same asMavenPublication.artifact(java.lang.Object, org.gradle.api.Action)
.