Package org.gradle.api.artifacts
Interface ModuleDependencyCapabilitiesHandler
public interface ModuleDependencyCapabilitiesHandler
The capabilities requested for a dependency. This is used in variant-aware dependency
 management, to select only variants which provide the requested capabilities. By
 default, Gradle will only look for variants which provide the "implicit" capability,
 which corresponds to the GAV coordinates of the component. If the user calls methods
 on this handler, then the requirements change and explicit capabilities are required.
- Since:
- 5.3
- 
Method SummaryModifier and TypeMethodDescriptionvoidrequireCapabilities(Object... capabilityNotations) Requires multiple capabilities.voidrequireCapability(Object capabilityNotation) Requires a single capability.voidrequireFeature(String featureName) Require a capability of a component based on the name of the feature provided by the component.voidrequireFeature(Provider<String> featureName) Lazily require a capability of a component based on the name of the feature provided by the component.
- 
Method Details- 
requireCapabilityRequires a single capability.
- 
requireCapabilitiesRequires multiple capabilities. The selected variants MUST provide ALL of them to be selected.
- 
requireFeatureRequire a capability of a component based on the name of the feature provided by the component.A capability is derived from a feature based on the module identity of the component that a dependency resolves to. For example, variant of a component with module identity 'group:name:version' that provides a feature named 'test-fixtures' would have a capability 'group:name-test-fixtures:version'. - Parameters:
- featureName- The name of the feature to require
- Since:
- 8.11
 
- 
requireFeatureLazily require a capability of a component based on the name of the feature provided by the component.- Parameters:
- featureName- The name of the feature to require
- Since:
- 8.11
- See Also:
 
 
-