CompileOptions

Java compilation options.

Properties

PropertyDescription
encoding

Java source files encoding.

incremental

Whether java compilation should use Gradle's new incremental model.

sourceCompatibility

Language level of the java source code.

targetCompatibility

Version of the generated Java bytecode.

Methods

No methods

Script blocks

No script blocks

Property details

String encoding

Java source files encoding.

Boolean incremental

Whether java compilation should use Gradle's new incremental model.

This may cause issues in projects that rely on annotation processing etc.

JavaVersion sourceCompatibility

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"

JavaVersion targetCompatibility

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"