# CompileOptions

abstract class CompileOptions : AbstractOptions(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 var 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 var 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

debug
Link copied to clipboard
open fun debug(debugArgs: Map<String, Any>): CompileOptions
Convenience method to set DebugOptions with named parameter syntax.
debug
Link copied to clipboard
inline fun CompileOptions.debug(vararg debugArgs: Pair<String, Any?>): CompileOptions

Kotlin extension function for org.gradle.api.tasks.compile.CompileOptions.debug.

define
Link copied to clipboard
open fun define(args: Map<String, Any>)
define
Link copied to clipboard
inline fun AbstractOptions.define(vararg args: Pair<String, Any?>)

Kotlin extension function for org.gradle.api.tasks.compile.AbstractOptions.define.

fork
Link copied to clipboard
open fun fork(forkArgs: Map<String, Any>): CompileOptions
Convenience method to set ForkOptions with named parameter syntax.
fork
Link copied to clipboard
inline fun CompileOptions.fork(vararg forkArgs: Pair<String, Any?>): CompileOptions

Kotlin extension function for org.gradle.api.tasks.compile.CompileOptions.fork.

getAllCompilerArgs
Link copied to clipboard
@Internal
open fun getAllCompilerArgs(): List<String>
Returns all compiler arguments, added to the getCompilerArgs or the getCompilerArgumentProviders property.
getAnnotationProcessorGeneratedSourcesDirectory
Link copied to clipboard
@Nullable
@ReplacedBy(value = "generatedSourceOutputDirectory")
open fun getAnnotationProcessorGeneratedSourcesDirectory(): File
Returns the directory to place source files generated by annotation processors.
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.
setAnnotationProcessorGeneratedSourcesDirectory
Link copied to clipboard
open fun setAnnotationProcessorGeneratedSourcesDirectory(@Nullable file: File)
open fun setAnnotationProcessorGeneratedSourcesDirectory(file: Provider<File>)
Sets the directory to place source files generated by annotation processors.
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.