api / org.gradle.api.attributes / DisambiguationRuleChain / pickFirst

pickFirst

abstract fun pickFirst(comparator: Comparator<in T>): Unit

Adds an ordered disambiguation rule. Values will be compared using the provided comparator, and the rule will automatically select the first value (if multiple candidates have the same attribute value, there will still be an ambiguity).

Parameters

comparator - the comparator to use