java.util.Collection<MavenArtifact>, DomainObjectCollection<MavenArtifact>, DomainObjectSet<MavenArtifact>, java.lang.Iterable<MavenArtifact>, java.util.Set<MavenArtifact>public interface MavenArtifactSet extends DomainObjectSet<MavenArtifact>
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.
plugins {
id 'maven-publish'
}
def publication = publishing.publications.create("name", MavenPublication)
def artifacts = publication.artifacts
artifacts.matching({
it.classifier == "classy"
}).all({
it.extension = "ext"
})
DomainObjectSet| Modifier and Type | Method | Description |
|---|---|---|
MavenArtifact |
artifact(java.lang.Object source) |
Creates and adds a
MavenArtifact to the set. |
MavenArtifact |
artifact(java.lang.Object source,
Action<? super MavenArtifact> config) |
Creates and adds a
MavenArtifact to the set, which is configured by the associated action. |
addAllLater, addLater, all, all, configureEach, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypefindAll, matching, matching, withTypeMavenArtifact artifact(java.lang.Object source)
MavenArtifact to the set.
The semantics of this method are the same as MavenPublication.artifact(Object).source - The source of the artifact content.MavenArtifact artifact(java.lang.Object source, Action<? super MavenArtifact> config)
MavenArtifact to the set, which is configured by the associated action.
The semantics of this method are the same as MavenPublication.artifact(Object, Action).source - The source of the artifact.config - An action or closure to configure the values of the constructed MavenArtifact.