Package org.gradle.api.artifacts
Interface CapabilityResolutionDetails
-
public interface CapabilityResolutionDetailsGives access to the resolution details of a single capability conflict. This class may be used to resolve a capability conflict by either selecting explicitly one of the candidates, or selecting the one with the highest version of the capability.- Since:
- 5.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CapabilityResolutionDetailsbecause(java.lang.String reason)Describes why a particular candidate is selected.java.util.List<ComponentVariantIdentifier>getCandidates()Returns the list of components which are in conflict on this capabilityCapabilitygetCapability()Returns the capability in conflictCapabilityResolutionDetailsselect(java.lang.Object notation)Selects a particular candidate to solve the conflict.CapabilityResolutionDetailsselect(ComponentVariantIdentifier candidate)Selects a particular candidate to solve the conflict.CapabilityResolutionDetailsselectHighestVersion()Automatically selects the candidate module which has the highest version of the capability.
-
-
-
Method Detail
-
getCapability
Capability getCapability()
Returns the capability in conflict
-
getCandidates
java.util.List<ComponentVariantIdentifier> getCandidates()
Returns the list of components which are in conflict on this capability
-
select
CapabilityResolutionDetails select(ComponentVariantIdentifier candidate)
Selects a particular candidate to solve the conflict. It is recommended to provide a human-readable explanation to the choice by calling thebecause(String)method- Parameters:
candidate- the selected candidate- Returns:
- this details instance
- Since:
- 6.0
-
select
CapabilityResolutionDetails select(java.lang.Object notation)
Selects a particular candidate to solve the conflict. It is recommended to provide a human-readable explanation to the choice by calling thebecause(String)method- Parameters:
notation- the selected candidate- Returns:
- this details instance
-
selectHighestVersion
CapabilityResolutionDetails selectHighestVersion()
Automatically selects the candidate module which has the highest version of the capability. A reason is automatically added so callingbecause(String)would override the automatic selection description.- Returns:
- this details instance
-
because
CapabilityResolutionDetails because(java.lang.String reason)
Describes why a particular candidate is selected.- Parameters:
reason- the reason why a candidate is selected.- Returns:
- this details instance
-
-