Package org.gradle.api.publish.maven
Schnittstelle MavenArtifactSet
- Alle Superschnittstellen:
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.
plugins {
id 'maven-publish'
}
def publication = publishing.publications.create("name", MavenPublication)
def artifacts = publication.artifacts
artifacts.matching({
it.classifier == "classy"
}).all({
it.extension = "ext"
})
- Siehe auch:
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungCreates 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.Von Schnittstelle geerbte Methoden java.util.Collection
parallelStream, removeIf, stream, toArrayVon Schnittstelle geerbte Methoden org.gradle.api.DomainObjectCollection
addAllLater, addLater, all, all, configureEach, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypeVon Schnittstelle geerbte Methoden org.gradle.api.DomainObjectSet
findAll, matching, matching, withType
-
Methodendetails
-
artifact
Creates and adds aMavenArtifactto the set. The semantics of this method are the same asMavenPublication.artifact(Object).- Parameter:
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).- Parameter:
source- The source of the artifact.config- An action or closure to configure the values of the constructedMavenArtifact.
-