# CompileOptions

abstract class CompileOptions : Serializable(source)

Main options for Java compilation.

## Constructors

CompileOptions
Link copied to clipboard
@Inject
constructor(objectFactory: ObjectFactory)

## Properties

annotationProcessorPath
Link copied to clipboard
@get: Nullable
@get: Optional
@get: Classpath
open var annotationProcessorPath: FileCollection
bootstrapClasspath
Link copied to clipboard
@get: Nullable
@get: Optional
@get: CompileClasspath
open var bootstrapClasspath: FileCollection
compilerArgs
Link copied to clipboard
@get: Input
open var compilerArgs: List<String>
compilerArgumentProviders
Link copied to clipboard
val compilerArgumentProviders: List<CommandLineArgumentProvider>
debugOptions
Link copied to clipboard
open val debugOptions: DebugOptions
encoding
Link copied to clipboard
@get: Nullable
@get: Optional
@get: Input
open var encoding: String
extensionDirs
Link copied to clipboard
@get: Nullable
@get: Optional
@get: Input
open var extensionDirs: String
forkOptions
Link copied to clipboard
open val forkOptions: ForkOptions
generatedSourceOutputDirectory
Link copied to clipboard
@get: Optional
@get: OutputDirectory
val generatedSourceOutputDirectory: DirectoryProperty
headerOutputDirectory
Link copied to clipboard
@get: Optional
@get: OutputDirectory
val headerOutputDirectory: DirectoryProperty
incrementalAfterFailure
Link copied to clipboard
@get: Input
@get: Optional
@get: Incubating
val incrementalAfterFailure: Property<Boolean>
javaModuleMainClass
Link copied to clipboard
@get: Optional
@get: Input
val javaModuleMainClass: Property<String>
javaModuleVersion
Link copied to clipboard
@get: Optional
@get: Input
val javaModuleVersion: Property<String>
release
Link copied to clipboard
@get: Input
@get: Optional
val release: Property<Integer>
sourcepath
Link copied to clipboard
@get: Optional
@get: Nullable
@get: IgnoreEmptyDirectories
@get: PathSensitive(value = PathSensitivity.RELATIVE)
@get: InputFiles
open var sourcepath: FileCollection

## Functions

debugOptions
Link copied to clipboard
open fun debugOptions(action: Action<in DebugOptions>)
Execute the given action against getDebugOptions.
forkOptions
Link copied to clipboard
open fun forkOptions(action: Action<in ForkOptions>)
Execute the given action against getForkOptions.
getAllCompilerArgs
Link copied to clipboard
@Internal
open fun getAllCompilerArgs(): List<String>
Returns all compiler arguments, added to the getCompilerArgs or the getCompilerArgumentProviders property.
isDebug
Link copied to clipboard
@Input
open fun isDebug(): Boolean
Tells whether to include debugging information in the generated class files.
isDeprecation
Link copied to clipboard
@Console
open fun isDeprecation(): Boolean
Tells whether to log details of usage of deprecated members or classes.
isFailOnError
Link copied to clipboard
@Input
open fun isFailOnError(): Boolean
Tells whether to fail the build when compilation fails.
isFork
Link copied to clipboard
@Input
open fun isFork(): Boolean
Tells whether to run the compiler in its own process.
isIncremental
Link copied to clipboard
@Internal
open fun isIncremental(): Boolean
informs whether to use incremental compilation feature.
isListFiles
Link copied to clipboard
@Console
open fun isListFiles(): Boolean
Tells whether to log the files to be compiled.
isVerbose
Link copied to clipboard
@Console
open fun isVerbose(): Boolean
Tells whether to produce verbose output.
isWarnings
Link copied to clipboard
@Console
open fun isWarnings(): Boolean
Tells whether to log warning messages.
setDebug
Link copied to clipboard
open fun setDebug(debug: Boolean)
Sets whether to include debugging information in the generated class files.
setDeprecation
Link copied to clipboard
open fun setDeprecation(deprecation: Boolean)
Sets whether to log details of usage of deprecated members or classes.
setFailOnError
Link copied to clipboard
open fun setFailOnError(failOnError: Boolean)
Sets whether to fail the build when compilation fails.
setFork
Link copied to clipboard
open fun setFork(fork: Boolean)
Sets whether to run the compiler in its own process.
setIncremental
Link copied to clipboard
open fun setIncremental(incremental: Boolean): CompileOptions
Configure the java compilation to be incremental (e.g.
setListFiles
Link copied to clipboard
open fun setListFiles(listFiles: Boolean)
Sets whether to log the files to be compiled.
setVerbose
Link copied to clipboard
open fun setVerbose(verbose: Boolean)
Sets whether to produce verbose output.
setWarnings
Link copied to clipboard
open fun setWarnings(warnings: Boolean)
Sets whether to log warning messages.