gradle
8.3

# add

abstract fun add(rule: Class<out AttributeDisambiguationRule<T>>)

Adds an arbitrary disambiguation rule to the chain.

A disambiguation rule can select the best match from a list of candidates.

A rule can express an preference by calling the @{link closestMatch method to tell that a candidate is the best one.

It is not mandatory for a rule to choose, and it is not an error to select multiple candidates.

#### Parameters

rule

the rule to add

abstract fun add(rule: Class<out AttributeDisambiguationRule<T>>, configureAction: Action<out Any>)

Adds an arbitrary disambiguation rule to the chain, possibly configuring the rule as well.

#### Parameters

rule

the rule to add

configureAction

the action to use to configure the rule