Compatibility Rule Chain
A chain of compatibility checks, implemented as action rules. By default the chain is empty and will eventually tell the values are incompatible if no rule expressed an opinion.
For a given set of rules, the execution is done in order, and interrupts as soon as a rule expressed an option (through compatible or incompatible).
If the end of the rule chain is reached and that no rule expressed an opinion then we apply an equality check by default, and eventually fail if they are not equal.
Parameters
<T>
the type of the attribute
Functions
Link copied to clipboard
Adds an arbitrary compatibility rule to the chain.
abstract fun add(rule: Class<out AttributeCompatibilityRule<T>>, configureAction: Action<in ActionConfiguration>)
Adds an arbitrary compatibility rule to the chain, possibly configuring the rule as well.
Link copied to clipboard
inline fun <T : Any> CompatibilityRuleChain<T>.add(rule: KClass<out AttributeCompatibilityRule<T>>, configureAction: Action<in ActionConfiguration>)
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.attributes.CompatibilityRuleChain.add.
Link copied to clipboard
Adds an ordered check rule to this chain.
Link copied to clipboard
Adds an reverse ordered check rule to this chain.