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.

setTargetCompatibility

Sets the target compatibility used for compiling Java sources.

This property cannot be set if a toolchain has been configured.

Since

4.10

Parameters

value

The value for the target compatibility

See also


abstract fun setTargetCompatibility(value: Any)(source)

Sets the target compatibility used for compiling Java sources.

Since

7.1

Parameters

value

The value for the target compatibility as defined by toVersion