org.gradle.api.publish.ivy
[Java] Interface IvyArtifactSet
java.lang.Iterable
org.gradle.api.publish.ivy.IvyArtifactSet
org.gradle.api.DomainObjectCollection
org.gradle.api.DomainObjectSet
java.util.Collection
- All Superinterfaces:
- Iterable, DomainObjectCollection, DomainObjectSet, Collection
@Incubating
public interface IvyArtifactSet
extends DomainObjectSet
A Collection of IvyArtifacts to be included in an IvyPublication.
Being a DomainObjectSet, a IvyArtifactSet provides convenient methods for querying, filtering, and applying actions to the set of IvyArtifacts.
apply plugin: 'ivy-publish'
def publication = publishing.publications.create("my-pub", IvyPublication)
def artifacts = publication.artifacts
artifacts.matching({
it.type == "source"
}).all({
it.extension = "src.jar"
})
- See Also:
- DomainObjectSet
Methods inherited from interface Set
|
add, equals, hashCode, clear, contains, isEmpty, size, toArray, toArray, addAll, iterator, remove, containsAll, removeAll, retainAll |
Methods inherited from interface DomainObjectCollection
|
all, all, findAll, matching, matching, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType, withType |
artifact
public IvyArtifact artifact(Object source)
- Creates and adds a IvyArtifact to the set.
The semantics of this method are the same as IvyPublication#artifact(Object)#artifact(Object).
- Parameters:
source
- The source of the artifact content.
artifact
public IvyArtifact artifact(Object source, Action config)
- Creates and adds a IvyArtifact to the set, which is configured by the associated action.
The semantics of this method are the same as IvyPublication#artifact(Object, Action)#artifact(Object, Action).
- Parameters:
source
- The source of the artifact.config
- An action to configure the values of the constructed IvyArtifact.
Gradle API 1.12