open class CompileOptions : AbstractOptions
Main options for Java compilation.
CompileOptions(objectFactory: ObjectFactory) |
open fun debug(debugArgs: MutableMap<String, Any>): CompileOptions
Convenience method to set DebugOptions with named parameter syntax. Calling this method will set |
|
open fun fork(forkArgs: MutableMap<String, Any>): CompileOptions
Convenience method to set ForkOptions with named parameter syntax. Calling this method will set |
|
open fun getAllCompilerArgs(): MutableList<String>
Returns all compiler arguments, added to the |
|
open fun getAnnotationProcessorGeneratedSourcesDirectory(): File
Returns the directory to place source files generated by annotation compilers. |
|
open fun getAnnotationProcessorPath(): FileCollection
Returns the classpath to use to load annotation processors. This path is also used for annotation processor discovery. If set to |
|
open fun getBootClasspath(): String
Returns the bootstrap classpath to be used for the compiler process. Defaults to |
|
open fun getBootstrapClasspath(): FileCollection
Returns the bootstrap classpath to be used for the compiler process. Defaults to |
|
open fun getCompilerArgs(): MutableList<String>
Returns any additional arguments to be passed to the compiler. Defaults to the empty list. Compiler arguments not supported by the DSL can be added here. For example, it is possible to pass the Note that if --release is added then -target and -source are ignored.
|
|
open fun getCompilerArgumentProviders(): MutableList<CommandLineArgumentProvider>
Compiler argument providers. |
|
open fun getDebugOptions(): DebugOptions
Returns options for generating debugging information. |
|
open fun getEncoding(): String
Returns the character encoding to be used when reading source files. Defaults to |
|
open fun getExtensionDirs(): String
Returns the extension dirs to be used for the compiler process. Defaults to |
|
open fun getForkOptions(): ForkOptions
Returns options for running the compiler in a child process. |
|
open fun getSourcepath(): FileCollection
The source path to use for the compilation. The source path indicates the location of source files that may be compiled if necessary. It is effectively a complement to the class path, where the classes to be compiled against are in source form. It does not indicate the actual primary source being compiled. The source path feature of the Java compiler is rarely needed for modern builds that use dependency management. The default value for the source path is |
|
open fun isDebug(): Boolean
Tells whether to include debugging information in the generated class files. Defaults to |
|
open fun isDeprecation(): Boolean
Tells whether to log details of usage of deprecated members or classes. Defaults to |
|
open fun isFailOnError(): Boolean
Tells whether to fail the build when compilation fails. Defaults to |
|
open fun isFork(): Boolean
Tells whether to run the compiler in its own process. Note that this does not necessarily mean that a new process will be created for each compile task. Defaults to |
|
open fun isIncremental(): Boolean
informs whether to use incremental compilation feature. See |
|
open fun isListFiles(): Boolean
Tells whether to log the files to be compiled. Defaults to |
|
open fun isVerbose(): Boolean
Tells whether to produce verbose output. Defaults to |
|
open fun isWarnings(): Boolean
Tells whether to log warning messages. The default is |
|
open fun optionMap(): MutableMap<String, Any>
Internal method. |
|
open fun setAnnotationProcessorGeneratedSourcesDirectory(file: File): Unit open fun setAnnotationProcessorGeneratedSourcesDirectory(file: Provider<File>): Unit
Sets the directory to place source files generated by annotation compilers. |
|
open fun setAnnotationProcessorPath(annotationProcessorPath: FileCollection): Unit
Set the classpath to use to load annotation processors. This path is also used for annotation processor discovery. The value can be |
|
open fun setBootClasspath(bootClasspath: String): Unit
Sets the bootstrap classpath to be used for the compiler process. Defaults to |
|
open fun setBootstrapClasspath(bootstrapClasspath: FileCollection): Unit
Sets the bootstrap classpath to be used for the compiler process. Defaults to |
|
open fun setCompilerArgs(compilerArgs: MutableList<String>): Unit
Sets any additional arguments to be passed to the compiler. Defaults to the empty list. |
|
open fun setDebug(debug: Boolean): Unit
Sets whether to include debugging information in the generated class files. Defaults to |
|
open fun setDebugOptions(debugOptions: DebugOptions): Unit
Sets options for generating debugging information. |
|
open fun setDeprecation(deprecation: Boolean): Unit
Sets whether to log details of usage of deprecated members or classes. Defaults to |
|
open fun setEncoding(encoding: String): Unit
Sets the character encoding to be used when reading source files. Defaults to |
|
open fun setExtensionDirs(extensionDirs: String): Unit
Sets the extension dirs to be used for the compiler process. Defaults to |
|
open fun setFailOnError(failOnError: Boolean): Unit
Sets whether to fail the build when compilation fails. Defaults to |
|
open fun setFork(fork: Boolean): Unit
Sets whether to run the compiler in its own process. Note that this does not necessarily mean that a new process will be created for each compile task. Defaults to |
|
open fun setForkOptions(forkOptions: ForkOptions): Unit
Sets options for running the compiler in a child process. |
|
open fun setIncremental(incremental: Boolean): CompileOptions
Configure the java compilation to be incremental (e.g. compiles only those java classes that were changed or that are dependencies to the changed classes). |
|
open fun setListFiles(listFiles: Boolean): Unit
Sets whether to log the files to be compiled. Defaults to |
|
open fun setSourcepath(sourcepath: FileCollection): Unit
Sets the source path to use for the compilation. |
|
open fun setVerbose(verbose: Boolean): Unit
Sets whether to produce verbose output. Defaults to |
|
open fun setWarnings(warnings: Boolean): Unit
Sets whether to log warning messages. The default is |
open fun define(args: MutableMap<String, Any>): Unit |