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.

getPreferredVersion

The preferred version of a module (which may be an exact version or a version range). The preferred version of a module provides a hint when resolving the version, but will not be honored in the presence of conflicting constraints.

Return

the preferred version, or empty string if no preferred version specified. Never null.

Since

4.4