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.

closestMatch

abstract fun closestMatch(candidate: T)(source)

Calling this method indicates that the candidate is the closest match. It is allowed to call this method several times with different values, in which case it indicates that multiple candidates are equally compatible.

Since

3.4

Parameters

candidate

The closest match. Must be present in getCandidateValues.