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

@Nullable
open fun toVersion(@Nullable value: @Nullable Any): @Nullable TargetJdk(source)

Converts the given object into a TargetJdk.

Return

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

Since

1.5

Parameters

value

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

Throws

when the provided value cannot be converted.