public class GroovyCompileOptions extends AbstractOptions
| Constructor and Description |
|---|
GroovyCompileOptions() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
excludedFieldsFromOptionMap()
Internal method.
|
protected Map<String,String> |
fieldName2AntMap()
Internal method.
|
GroovyCompileOptions |
fork(Map forkArgs)
Convenience method to set
ForkOptions with named parameter syntax. |
String |
getEncoding()
Tells the source encoding.
|
List<String> |
getFileExtensions()
Returns the list of acceptable source file extensions.
|
GroovyForkOptions |
getForkOptions()
Returns options for running the Groovy compiler in a separate process.
|
Map<String,Boolean> |
getOptimizationOptions()
Returns optimization options for the Groovy compiler.
|
File |
getStubDir()
Returns the directory where Java stubs for Groovy classes will be stored during Java/Groovy joint
compilation.
|
boolean |
isFailOnError()
Tells whether the compilation task should fail if compile errors occurred.
|
boolean |
isFork()
Tells whether to run the Groovy compiler in a separate process.
|
boolean |
isIncludeJavaRuntime()
Tells whether the Java runtime should be put on the compile class path.
|
boolean |
isKeepStubs()
Tells whether Java stubs for Groovy classes generated during Java/Groovy joint compilation
should be kept after compilation has completed.
|
boolean |
isListFiles()
Tells whether to print which source files are to be compiled.
|
boolean |
isStacktrace()
Tells whether to print a stack trace when the compiler hits a problem (like a compile error).
|
boolean |
isUseAnt()
Tells whether the groovyc Ant task should be used over Gradle's own Groovy compiler integration.
|
boolean |
isVerbose()
Tells whether to turn on verbose output.
|
Map<String,Object> |
optionMap()
Internal method.
|
void |
setEncoding(String encoding)
Sets the source encoding.
|
void |
setFailOnError(boolean failOnError)
Sets whether the compilation task should fail if compile errors occurred.
|
void |
setFileExtensions(List<String> fileExtensions)
Sets the list of acceptable source file extensions.
|
void |
setFork(boolean fork)
Sets whether to run the Groovy compiler in a separate process.
|
void |
setForkOptions(GroovyForkOptions forkOptions)
Sets options for running the Groovy compiler in a separate process.
|
void |
setIncludeJavaRuntime(boolean includeJavaRuntime)
Sets whether the Java runtime should be put on the compile class path.
|
void |
setKeepStubs(boolean keepStubs)
Sets whether Java stubs for Groovy classes generated during Java/Groovy joint compilation
should be kept after compilation has completed.
|
void |
setListFiles(boolean listFiles)
Sets whether to print which source files are to be compiled.
|
void |
setOptimizationOptions(Map<String,Boolean> optimizationOptions)
Sets optimization options for the Groovy compiler.
|
void |
setStacktrace(boolean stacktrace)
Sets whether to print a stack trace when the compiler hits a problem (like a compile error).
|
void |
setStubDir(File stubDir)
Sets the directory where Java stubs for Groovy classes will be stored during Java/Groovy joint
compilation.
|
void |
setUseAnt(boolean useAnt)
Sets whether the groovyc Ant task should be used over Gradle's own Groovy compiler integration.
|
void |
setVerbose(boolean verbose)
Sets whether to turn on verbose output.
|
define, fieldValue2AntMappublic boolean isFailOnError()
true.public void setFailOnError(boolean failOnError)
true.public boolean isVerbose()
false.public void setVerbose(boolean verbose)
false.public boolean isListFiles()
false.public void setListFiles(boolean listFiles)
false.public void setEncoding(String encoding)
UTF-8.public boolean isFork()
true.public void setFork(boolean fork)
true.public GroovyForkOptions getForkOptions()
fork is set to true.public void setForkOptions(GroovyForkOptions forkOptions)
fork is set to true.public Map<String,Boolean> getOptimizationOptions()
true and false.
Only takes effect when compiling against Groovy 1.8 or higher.
Known options are:
public void setOptimizationOptions(Map<String,Boolean> optimizationOptions)
true and false.
Only takes effect when compiling against Groovy 1.8 or higher.public boolean isStacktrace()
false.public void setStacktrace(boolean stacktrace)
false.@Input public boolean isUseAnt()
false.public void setUseAnt(boolean useAnt)
false.@Input public boolean isIncludeJavaRuntime()
useAnt is true. Defaults to false.public void setIncludeJavaRuntime(boolean includeJavaRuntime)
useAnt is true. Defaults to false.public File getStubDir()
null, in which case a temporary directory will be used.public void setStubDir(File stubDir)
null, in which case a temporary directory will be used.@Input @Experimental public List<String> getFileExtensions()
ImmutableList.of("java", "groovy").@Experimental public void setFileExtensions(List<String> fileExtensions)
ImmutableList.of("java", "groovy").public boolean isKeepStubs()
false.public void setKeepStubs(boolean keepStubs)
false.public GroovyCompileOptions fork(Map forkArgs)
ForkOptions with named parameter syntax.
Calling this method will set fork to true.protected List<String> excludedFieldsFromOptionMap()
excludedFieldsFromOptionMap in class AbstractOptionsprotected Map<String,String> fieldName2AntMap()
fieldName2AntMap in class AbstractOptionspublic Map<String,Object> optionMap()
optionMap in class AbstractOptions