api / org.gradle.api.artifacts / ComponentSelectionRules / all

all

abstract fun all(selectionAction: Action<in ComponentSelection>): ComponentSelectionRules

Adds a simple component selection rule that will apply to all resolved components. Each rule will receive a ComponentSelection object as an argument.

Parameters

selectionAction - the Action that implements a rule to be applied

Return
this

abstract fun all(closure: Closure<*>): ComponentSelectionRules

Adds a component selection rule that will apply to all resolved components. Each rule will receive a ComponentSelection object as an argument as well as any other arguments specified for the closure. Allowable closure arguments are ComponentSelection (required), org.gradle.api.artifacts.ComponentMetadata and/or org.gradle.api.artifacts.ivy.IvyModuleDescriptor.

Parameters

closure - the Closure that implements a rule to be applied

Return
this

abstract fun all(ruleSource: Any): ComponentSelectionRules

Adds a rule-source backed component selection rule that will apply to all resolved components. The ruleSource provides the rule as exactly one rule method annotated with org.gradle.model.Mutate. This rule method:

Parameters

ruleSource - an instance providing a rule implementation

Return
this