Package org.gradle.api.artifacts
Interface ConfigurationPublications
- All Superinterfaces:
- HasAttributes,- HasConfigurableAttributes<ConfigurationPublications>
public interface ConfigurationPublications
extends HasConfigurableAttributes<ConfigurationPublications>
Represents the outgoing artifacts associated with a configuration. These artifacts are used when the configuration is referenced during dependency resolution.
 
You can use this interface to associate artifacts with a configuration using the artifact(Object) methods. You can also define several variants of the configuration's artifacts. Each variant represents a set of artifacts that form some mutually exclusive usage of the component.
An implicit variant is defined for a configuration whenever any artifacts are attached directly to this object or inherited from another configuration.
- Since:
- 3.3
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds an outgoing artifact to this configuration.voidartifact(Object notation, Action<? super ConfigurablePublishArtifact> configureAction) Adds an outgoing artifact to this configuration, configuring it using the given action.voidLazily adds a collection of outgoing artifacts to this configuration.voidartifacts(Provider<? extends Iterable<?>> provider, Action<? super ConfigurablePublishArtifact> configureAction) Lazily adds a collection of outgoing artifacts to this configuration, configuring each artifact using the given action.voidcapability(Object notation) Declares a capability for this configuration.Returns the artifacts associated with this configuration.Collection<? extends Capability> Returns the capabilities declared for this configuration.Returns the variants of this configuration, if any.voidvariants(Action<? super NamedDomainObjectContainer<ConfigurationVariant>> configureAction) Configures the variants of this configuration.Methods inherited from interface org.gradle.api.attributes.HasAttributesgetAttributesMethods inherited from interface org.gradle.api.attributes.HasConfigurableAttributesattributes
- 
Method Details- 
getArtifactsPublishArtifactSet getArtifacts()Returns the artifacts associated with this configuration. When an artifact is added to this set, an implicit variant is defined for the configuration. These artifacts are also inherited by all configurations that extend this configuration.
- 
artifactAdds an outgoing artifact to this configuration. This artifact is included in all variants.See ArtifactHandlerfor details of the supported notations.
- 
artifactAdds an outgoing artifact to this configuration, configuring it using the given action. This artifact is included in all variants.See ArtifactHandlerfor details of the supported notations.
- 
artifactsLazily adds a collection of outgoing artifacts to this configuration. These artifacts are included in all variants.- Parameters:
- provider- The provider of the artifacts to add.
- Since:
- 7.4
 
- 
artifactsvoid artifacts(Provider<? extends Iterable<?>> provider, Action<? super ConfigurablePublishArtifact> configureAction) Lazily adds a collection of outgoing artifacts to this configuration, configuring each artifact using the given action. These artifacts are included in all variants.- Parameters:
- provider- The provider of the artifacts to add.
- Since:
- 7.4
 
- 
getVariantsNamedDomainObjectContainer<ConfigurationVariant> getVariants()Returns the variants of this configuration, if any.
- 
variantsConfigures the variants of this configuration.
- 
capabilityDeclares a capability for this configuration.- Parameters:
- notation- the notation Valid notations are a group:name:version string (e.g: org.test:capability:1.0, or a map with keys group, name and version. Providers of any notation are also accepted
- Since:
- 4.7.
 
- 
getCapabilitiesCollection<? extends Capability> getCapabilities()Returns the capabilities declared for this configuration.- Returns:
- the capabilities for this variant
- Since:
- 4.7
 
 
-