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.

toVersion

open fun toVersion(value: Any): JavaVersion(source)

Converts the given object into a JavaVersion.

Return

The version, or null if the provided value is null.

Since

0.7

Parameters

value

An object whose toString() value is to be converted. May be null.

Throws

when the provided value cannot be converted.