gradle
8.2

# setSourceCompatibility

abstract fun setSourceCompatibility(value: JavaVersion)

Sets the source compatibility used for compiling Java sources.

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

#### Parameters

value

The value for the source compatibility

#### See also

toolchain(Action)

abstract fun setSourceCompatibility(value: Any)

Sets the source compatibility used for compiling Java sources.

#### Parameters

value

The value for the source compatibility as defined by toVersion