@Incubating public interface ComponentSelectionRules
configurations { conf { resolutionStrategy { componentSelection { all { ComponentSelection selection -> if (selection.candidate.name == 'someModule' && selection.candidate.version == '1.1') { selection.reject("bad version '1.1' for 'someModule'") } } all { ComponentSelection selection, IvyModuleDescriptor descriptor, ComponentMetadata metadata -> if (selection.candidate.name == 'someModule' && descriptor.branch == 'testing') { if (metadata.status != 'milestone') { selection.reject("only use milestones for someModule:testing") } } } module("org.sample:api") { ComponentSelection selection -> if (selection.candidate.version == "1.1") { selection.reject("known bad version") } } } } } }
修飾子とタイプ | メソッドと説明 |
---|---|
ComponentSelectionRules |
all(Action<? super ComponentSelection> selectionAction)
Adds a simple component selection rule that will apply to all resolved components.
|
ComponentSelectionRules |
all(Closure<?> closure)
Adds a component selection rule that will apply to all resolved components.
|
ComponentSelectionRules |
module(Object id,
Action<? super ComponentSelection> selectionAction)
Adds a component selection rule that will apply to the specified module.
|
ComponentSelectionRules |
module(Object id,
Closure<?> closure)
Adds a component selection rule that will apply to the specified module.
|
ComponentSelectionRules all(Action<? super ComponentSelection> selectionAction)
ComponentSelection
object as an argument.selectionAction
- the Action that implements a rule to be appliedComponentSelectionRules all(Closure<?> closure)
ComponentSelection
object as an argument
as well as any other arguments specified for the closure.
Allowable closure arguments are ComponentSelection
(required),
ComponentMetadata
and/or
IvyModuleDescriptor
.closure
- the Closure that implements a rule to be appliedComponentSelectionRules module(Object id, Action<? super ComponentSelection> selectionAction)
ComponentSelection
object as an argument.id
- the module to apply this rule to in "group:module" format or as a ModuleIdentifier
selectionAction
- the Action that implements a rule to be appliedComponentSelectionRules module(Object id, Closure<?> closure)
ComponentSelection
object as an argument
as well as any other arguments specified for the closure.
Allowable closure arguments are ComponentSelection
(required),
ComponentMetadata
and/or
IvyModuleDescriptor
.id
- the module to apply this rule to in "group:module" format or as a ModuleIdentifier
closure
- the Closure that implements a rule to be applied