Interface MavenArtifactSet
- All Superinterfaces:
Collection<MavenArtifact>, DomainObjectCollection<MavenArtifact>, DomainObjectSet<MavenArtifact>, Iterable<MavenArtifact>, Set<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:
-
Method Summary
Modifier and TypeMethodDescriptionCreates and adds aMavenArtifactto the set.artifact(Object source, Action<? super MavenArtifact> config) Creates and adds aMavenArtifactto the set, which is configured by the associated action.Methods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface DomainObjectCollection
all, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypeMethods inherited from interface DomainObjectSet
findAll, matching, matching, withType
-
Method Details
-
artifact
Creates and adds aMavenArtifactto the set. The semantics of this method are the same asMavenPublication.artifact(Object).- Parameters:
source- The source of the artifact content.
-
artifact
Creates and adds aMavenArtifactto the set, which is configured by the associated action. The semantics of this method are the same asMavenPublication.artifact(Object, Action).- Parameters:
source- The source of the artifact.config- An action or closure to configure the values of the constructedMavenArtifact.
-