# setSourceCompatibility

abstract fun setSourceCompatibility(value: JavaVersion)(source)

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)(source)

Sets the source compatibility used for compiling Java sources.

#### Since

7.1

#### Parameters

value

The value for the source compatibility as defined by toVersion