CompileOptions

Added in 4.2.0

interface CompileOptions


Java compilation options.

Summary

Public functions

Unit
sourceCompatibility(sourceCompatibility: Any)

Language level of the java source code.

Unit
targetCompatibility(targetCompatibility: Any)

Version of the generated Java bytecode.

Public properties

String

Java source files encoding.

Boolean

Whether core library desugaring is enabled.

JavaVersion

Language level of the java source code.

JavaVersion

Version of the generated Java bytecode.

Public functions

sourceCompatibility

Added in 4.2.0
fun sourceCompatibility(sourceCompatibility: Any): Unit

Language level of the java source code.

Similar to what Gradle Java plugin uses. Formats supported are:

  • "1.6"

  • 1.6

  • JavaVersion.Version_1_6

  • "Version_1_6"

targetCompatibility

Added in 4.2.0
fun targetCompatibility(targetCompatibility: Any): Unit

Version of the generated Java bytecode.

Similar to what Gradle Java plugin uses. Formats supported are:

  • "1.6"

  • 1.6

  • JavaVersion.Version_1_6

  • "Version_1_6"

Public properties

encoding

Added in 4.2.0
var encodingString

Java source files encoding.

isCoreLibraryDesugaringEnabled

Added in 4.2.0
var isCoreLibraryDesugaringEnabledBoolean

Whether core library desugaring is enabled.

sourceCompatibility

Added in 4.2.0
var sourceCompatibilityJavaVersion

Language level of the java source code.

Similar to what Gradle Java plugin uses. Formats supported are:

  • "1.6"

  • 1.6

  • JavaVersion.Version_1_6

  • "Version_1_6"

targetCompatibility

Added in 4.2.0
var targetCompatibilityJavaVersion

Version of the generated Java bytecode.

Similar to what Gradle Java plugin uses. Formats supported are:

  • "1.6"

  • 1.6

  • JavaVersion.Version_1_6

  • "Version_1_6"