api / org.gradle.api.artifacts.result / ComponentSelectionReason

ComponentSelectionReason

@Incubating interface ComponentSelectionReason

Answers the question why a component was selected during the dependency resolution.

Since
1.3

Functions

getDescription

abstract fun getDescription(): String

Returns a human-consumable description of this selection reason.

getDescriptions

abstract fun getDescriptions(): MutableList<ComponentSelectionDescriptor>

Returns a list of descriptions of the causes that led to the selection of this component.

isCompositeSubstitution

abstract fun isCompositeSubstitution(): Boolean

Informs whether the selected component is a project substitute from a build participating in in a composite build.

isConflictResolution

abstract fun isConflictResolution(): Boolean

Informs whether the component was selected by conflict resolution. For more information about Gradle's conflict resolution please refer to the user guide. contains information about conflict resolution and includes means to configure it.

isConstrained

abstract fun isConstrained(): Boolean

Informs whether the selected component version has been influenced by a dependency constraint.

isExpected

abstract fun isExpected(): Boolean

Informs whether the component is the requested selection of all dependency declarations, and was not replaced for some reason, such as conflict resolution.

isForced

abstract fun isForced(): Boolean

Informs whether the component was forced. Users can force components via org.gradle.api.artifacts.ResolutionStrategy or when declaring dependencies (see ).

isSelectedByRule

abstract fun isSelectedByRule(): Boolean

Informs whether the component was selected by the dependency substitution rule. Users can configure dependency substitution rules via