# GroovyCompileOptions

abstract class GroovyCompileOptions : Serializable(source)

Compilation options to be passed to the Groovy compiler.

## Constructors

GroovyCompileOptions
Link copied to clipboard
constructor()

## Functions

forkOptions
Link copied to clipboard
open fun forkOptions(action: Action<in GroovyForkOptions>)
Execute the given action against getForkOptions.
getConfigurationScript
Link copied to clipboard
@Optional
@PathSensitive(value = PathSensitivity.NONE)
@InputFile
abstract fun getConfigurationScript(): RegularFileProperty
A Groovy script file that configures the compiler, allowing extensive control over how the code is compiled.
getDisabledGlobalASTTransformations
Link copied to clipboard
@Input
abstract fun getDisabledGlobalASTTransformations(): SetProperty<String>
Returns the set of global AST transformations which should not be loaded into the Groovy compiler.
getEncoding
Link copied to clipboard
@Input
abstract fun getEncoding(): Property<String>
Tells the source encoding.
getFailOnError
Link copied to clipboard
@Input
abstract fun getFailOnError(): Property<Boolean>
Tells whether the compilation task should fail if compile errors occurred.
getFileExtensions
Link copied to clipboard
@Input
abstract fun getFileExtensions(): ListProperty<String>
Returns the list of acceptable source file extensions.
getFork
Link copied to clipboard
@Input
abstract fun getFork(): Property<Boolean>
Tells whether to run the Groovy compiler in a separate process.
getForkOptions
Link copied to clipboard
abstract fun getForkOptions(): GroovyForkOptions
Returns options for running the Groovy compiler in a separate process.
getIsFailOnError
Link copied to clipboard
@Internal
open fun getIsFailOnError(): Property<Boolean>
getIsFork
Link copied to clipboard
@Internal
open fun getIsFork(): Property<Boolean>
getIsJavaAnnotationProcessing
Link copied to clipboard
@Internal
open fun getIsJavaAnnotationProcessing(): Property<Boolean>
getIsKeepStubs
Link copied to clipboard
@Internal
open fun getIsKeepStubs(): Property<Boolean>
getIsListFiles
Link copied to clipboard
@Internal
open fun getIsListFiles(): Property<Boolean>
getIsParameters
Link copied to clipboard
@Internal
open fun getIsParameters(): Property<Boolean>
getIsVerbose
Link copied to clipboard
@Internal
open fun getIsVerbose(): Property<Boolean>
getJavaAnnotationProcessing
Link copied to clipboard
@Input
abstract fun getJavaAnnotationProcessing(): Property<Boolean>
Whether the Groovy code should be subject to Java annotation processing.
getKeepStubs
Link copied to clipboard
@Input
abstract fun getKeepStubs(): Property<Boolean>
Tells whether Java stubs for Groovy classes generated during Java/Groovy joint compilation should be kept after compilation has completed.
getListFiles
Link copied to clipboard
@Console
abstract fun getListFiles(): Property<Boolean>
Tells whether to print which source files are to be compiled.
getOptimizationOptions
Link copied to clipboard
@Input
@Optional
abstract fun getOptimizationOptions(): MapProperty<String, Boolean>
Returns optimization options for the Groovy compiler.
getParameters
Link copied to clipboard
@Input
abstract fun getParameters(): Property<Boolean>
Whether the Groovy compiler generate metadata for reflection on method parameter names on JDK 8 and above.
getStubDir
Link copied to clipboard
@Internal
abstract fun getStubDir(): DirectoryProperty
Returns the directory where Java stubs for Groovy classes will be stored during Java/Groovy joint compilation.
getVerbose
Link copied to clipboard
@Console
abstract fun getVerbose(): Property<Boolean>
Tells whether to turn on verbose output.
setConfigurationScript
Link copied to clipboard
open fun setConfigurationScript(@Nullable configurationFile: @Nullable File)
Sets the path to the groovy configuration file.
setEncoding
Link copied to clipboard
open fun setEncoding(encoding: String)
Sets the source encoding.
setFailOnError
Link copied to clipboard
open fun setFailOnError(failOnError: Boolean)
Sets whether the compilation task should fail if compile errors occurred.
setFileExtensions
Link copied to clipboard
open fun setFileExtensions(fileExtensions: List<String>)
Sets the list of acceptable source file extensions.
setFork
Link copied to clipboard
open fun setFork(fork: Boolean)
Sets whether to run the Groovy compiler in a separate process.
setJavaAnnotationProcessing
Link copied to clipboard
open fun setJavaAnnotationProcessing(javaAnnotationProcessing: Boolean)
Sets whether Java annotation processors should process annotations on stubs.
setKeepStubs
Link copied to clipboard
open fun setKeepStubs(keepStubs: Boolean)
Sets whether Java stubs for Groovy classes generated during Java/Groovy joint compilation should be kept after compilation has completed.
setListFiles
Link copied to clipboard
open fun setListFiles(listFiles: Boolean)
Sets whether to print which source files are to be compiled.
setOptimizationOptions
Link copied to clipboard
open fun setOptimizationOptions(@Nullable optimizationOptions: @Nullable Map<String, Boolean>)
Sets optimization options for the Groovy compiler.
setParameters
Link copied to clipboard
open fun setParameters(parameters: Boolean)
Sets whether metadata for reflection on method parameter names should be generated.
setStubDir
Link copied to clipboard
open fun setStubDir(stubDir: File)
Sets the directory where Java stubs for Groovy classes will be stored during Java/Groovy joint compilation.
setVerbose
Link copied to clipboard
open fun setVerbose(verbose: Boolean)
Sets whether to turn on verbose output.