Package org.gradle.api.publish.maven
Interface MavenArtifactSet
-
- All Superinterfaces:
java.util.Collection<MavenArtifact>,DomainObjectCollection<MavenArtifact>,DomainObjectSet<MavenArtifact>,java.lang.Iterable<MavenArtifact>,java.util.Set<MavenArtifact>
public interface MavenArtifactSet extends DomainObjectSet<MavenArtifact>
A Collection ofMavenArtifacts to be included in aMavenPublication. Being aDomainObjectSet, aMavenArtifactSetprovides convenient methods for querying, filtering, and applying actions to the set ofMavenArtifacts.plugins { id 'maven-publish' } def publication = publishing.publications.create("name", MavenPublication) def artifacts = publication.artifacts artifacts.matching({ it.classifier == "classy" }).all({ it.extension = "ext" })- See Also:
DomainObjectSet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MavenArtifactartifact(java.lang.Object source)Creates and adds aMavenArtifactto the set.MavenArtifactartifact(java.lang.Object source, Action<? super MavenArtifact> config)Creates and adds aMavenArtifactto the set, which is configured by the associated action.-
Methods inherited from interface org.gradle.api.DomainObjectCollection
addAllLater, addLater, all, all, configureEach, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType
-
Methods inherited from interface org.gradle.api.DomainObjectSet
findAll, matching, matching, withType
-
-
-
-
Method Detail
-
artifact
MavenArtifact artifact(java.lang.Object source)
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
MavenArtifact artifact(java.lang.Object source, Action<? super MavenArtifact> config)
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.
-
-