Package org.gradle.api.artifacts.result
Interface ComponentSelectionReason
public interface ComponentSelectionReason
Answers the question why a component was selected during the dependency resolution.
- Since:
- 1.3
- 
Method SummaryModifier and TypeMethodDescriptionReturns a list of descriptions of the causes that led to the selection of this component.booleanInforms whether the selected component is a project substitute from a build participating in a composite build.booleanInforms whether the component was selected by conflict resolution.booleanInforms whether the selected component version has been influenced by a dependency constraint.booleanInforms whether the component is the requested selection of all dependency declarations, and was not replaced for some reason, such as conflict resolution.booleanisForced()Informs whether the component was forced.booleanInforms whether the component was selected by the dependency substitution rule.
- 
Method Details- 
isForcedboolean isForced()Informs whether the component was forced. Users can force components viaResolutionStrategyor when declaring dependencies (seeDependencyHandler).
- 
isConflictResolutionboolean isConflictResolution()Informs whether the component was selected by conflict resolution. For more information about Gradle's conflict resolution please refer to the user manual.ResolutionStrategycontains information about conflict resolution and includes means to configure it.
- 
isSelectedByRuleboolean isSelectedByRule()Informs whether the component was selected by the dependency substitution rule. Users can configure dependency substitution rules viaResolutionStrategy.getDependencySubstitution()- Since:
- 1.4
 
- 
isExpectedboolean isExpected()Informs whether the component is the requested selection of all dependency declarations, and was not replaced for some reason, such as conflict resolution.- Since:
- 1.11
 
- 
isCompositeSubstitutionboolean isCompositeSubstitution()Informs whether the selected component is a project substitute from a build participating in a composite build.- Since:
- 4.5
 
- 
isConstrainedboolean isConstrained()Informs whether the selected component version has been influenced by a dependency constraint.- Returns:
- true if a dependency constraint influenced the selection of this component
- Since:
- 4.6
 
- 
getDescriptionsList<ComponentSelectionDescriptor> getDescriptions()Returns a list of descriptions of the causes that led to the selection of this component.- Returns:
- the list of descriptions.
- Since:
- 4.6
 
 
-