CompileOptions

Java compilation options.

Properties

PropertyDescription
encoding

Java source files encoding.

incremental

Whether Java compilation should be incremental or not.

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 be incremental or not.

Note that even if this option is set to true, Java compilation may still be non-incremental (e.g., if incremental annotation processing is not yet possible in the project).

If this option is not set (set to null), Java compilation may or may not be incremental, depending on the Android Gradle plugin's default behavior (<UNHANDLED-LINK>com.android.build.gradle.tasks.JavaCompileUtils#DEFAULT_INCREMENTAL_COMPILATION</UNHANDLED-LINK>) and Gradle's default behavior.

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"