For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

pickFirst

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

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).

Since

3.3

Parameters

comparator

the comparator to use