Interface MetadataSupplierAware
-
- All Known Subinterfaces:
IvyArtifactRepository
,MavenArtifactRepository
public interface MetadataSupplierAware
Interface for repositories which support custom metadata suppliers and/or version listers. A custom version lister or metadata supplier can be used as an optimization technique to avoid too many requests on a server. By providing such rules, a plugin or build author can provide the necessary information to perform component selection without having to actually fetch the component metadata on a server.- Since:
- 4.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setComponentVersionsLister(java.lang.Class<? extends ComponentMetadataVersionLister> lister)
Sets a custom component versions lister.void
setComponentVersionsLister(java.lang.Class<? extends ComponentMetadataVersionLister> lister, Action<? super ActionConfiguration> configureAction)
Sets a custom component versions lister.void
setMetadataSupplier(java.lang.Class<? extends ComponentMetadataSupplier> rule)
Sets a custom metadata rule, which is capable of supplying the metadata of a component (status, status scheme, changing flag) whenever a dynamic version is requested.void
setMetadataSupplier(java.lang.Class<? extends ComponentMetadataSupplier> rule, Action<? super ActionConfiguration> configureAction)
Sets a custom metadata rule, possibly configuring the rule.
-
-
-
Method Detail
-
setMetadataSupplier
void setMetadataSupplier(java.lang.Class<? extends ComponentMetadataSupplier> rule)
Sets a custom metadata rule, which is capable of supplying the metadata of a component (status, status scheme, changing flag) whenever a dynamic version is requested. It can be used to provide metadata directly, instead of having to parse the Ivy descriptor.- Parameters:
rule
- the class of the rule. Gradle will instantiate a new rule for each dependency which requires metadata.- Since:
- 4.9
-
setMetadataSupplier
void setMetadataSupplier(java.lang.Class<? extends ComponentMetadataSupplier> rule, Action<? super ActionConfiguration> configureAction)
Sets a custom metadata rule, possibly configuring the rule.- Parameters:
rule
- the class of the rule. Gradle will instantiate a new rule for each dependency which requires metadata.configureAction
- the action to use to configure the rule.- Since:
- 4.9
-
setComponentVersionsLister
void setComponentVersionsLister(java.lang.Class<? extends ComponentMetadataVersionLister> lister)
Sets a custom component versions lister. A versions lister will be called whenever a dynamic version is requested.- Parameters:
lister
- the class of the lister.- Since:
- 4.9
-
setComponentVersionsLister
void setComponentVersionsLister(java.lang.Class<? extends ComponentMetadataVersionLister> lister, Action<? super ActionConfiguration> configureAction)
Sets a custom component versions lister. A versions lister will be called whenever a dynamic version is requested.- Parameters:
lister
- the class of the lister.configureAction
- the action to use to configure the lister.- Since:
- 4.9
-
-