public class CompileOptions extends AbstractOptions
Constructor and Description |
---|
CompileOptions() |
Modifier and Type | Method and Description |
---|---|
CompileOptions |
debug(Map<String,Object> debugArgs)
Convenience method to set
DebugOptions with named parameter syntax. |
CompileOptions |
depend(Map<String,Object> dependArgs)
Convenience method to set
DependOptions with named parameter syntax. |
protected List<String> |
excludedFieldsFromOptionMap()
Internal method.
|
protected Map<String,String> |
fieldName2AntMap()
Internal method.
|
protected Map<String,? extends Callable<Object>> |
fieldValue2AntMap()
Internal method.
|
CompileOptions |
fork(Map<String,Object> forkArgs)
Convenience method to set
ForkOptions with named parameter syntax. |
String |
getBootClasspath()
Returns the bootstrap classpath to be used for the compiler process.
|
String |
getCompiler()
Deprecated.
use
CompileOptions.forkOptions.executable instead |
List<String> |
getCompilerArgs()
Returns any additional arguments to be passed to the compiler.
|
boolean |
getDebug()
Tells whether to include debugging information in the generated class files.
|
DebugOptions |
getDebugOptions()
Returns options for generating debugging information.
|
DependOptions |
getDependOptions()
Returns options for using the Ant
<depend> task. |
String |
getEncoding()
Returns the character encoding to be used when reading source files.
|
String |
getExtensionDirs()
Returns the extension dirs to be used for the compiler process.
|
boolean |
getFailOnError()
Tells whether to fail the build when compilation fails.
|
ForkOptions |
getForkOptions()
Returns options for running the compiler in a child process.
|
boolean |
getIncludeJavaRuntime()
Tells whether the Java runtime should be put on the compile class path.
|
boolean |
getOptimize()
Tells whether to produce optimized byte code.
|
boolean |
isDebug()
Tells whether to include debugging information in the generated class files.
|
boolean |
isDeprecation()
Tells whether to log details of usage of deprecated members or classes.
|
boolean |
isFailOnError()
Tells whether to fail the build when compilation fails.
|
boolean |
isFork()
Tells whether to run the compiler in its own process.
|
boolean |
isIncludeJavaRuntime()
Tells whether the Java runtime should be put on the compile class path.
|
boolean |
isListFiles()
Tells whether to log the files to be compiled.
|
boolean |
isOptimize()
Tells whether to produce optimized byte code.
|
boolean |
isUseAnt()
Tells whether to use the Ant javac task over Gradle's own Java compiler integration.
|
boolean |
isUseDepend()
Tells whether to use the Ant
<depend> task. |
boolean |
isVerbose()
Tells whether to produce verbose output.
|
boolean |
isWarnings()
Tells whether to log warning messages.
|
Map<String,Object> |
optionMap()
Internal method.
|
void |
setBootClasspath(String bootClasspath)
Sets the bootstrap classpath to be used for the compiler process.
|
void |
setCompiler(String compiler)
Deprecated.
use
CompileOptions.forkOptions.executable instead |
void |
setCompilerArgs(List<String> compilerArgs)
Sets any additional arguments to be passed to the compiler.
|
void |
setDebug(boolean debug)
Sets whether to include debugging information in the generated class files.
|
void |
setDebugOptions(DebugOptions debugOptions)
Sets options for generating debugging information.
|
void |
setDependOptions(DependOptions dependOptions)
Sets options for using the Ant
<depend> task. |
void |
setDeprecation(boolean deprecation)
Sets whether to log details of usage of deprecated members or classes.
|
void |
setEncoding(String encoding)
Sets the character encoding to be used when reading source files.
|
void |
setExtensionDirs(String extensionDirs)
Sets the extension dirs to be used for the compiler process.
|
void |
setFailOnError(boolean failOnError)
Sets whether to fail the build when compilation fails.
|
void |
setFork(boolean fork)
Sets whether to run the compiler in its own process.
|
void |
setForkOptions(ForkOptions forkOptions)
Sets options for running the compiler in a child process.
|
void |
setIncludeJavaRuntime(boolean includeJavaRuntime)
Sets whether the Java runtime should be put on the compile class path.
|
void |
setListFiles(boolean listFiles)
Sets whether to log the files to be compiled.
|
void |
setOptimize(boolean optimize)
Sets whether to produce optimized byte code.
|
void |
setUseAnt(boolean useAnt)
Sets whether to use the Ant javac task over Gradle's own Java compiler integration.
|
void |
setUseDepend(boolean useDepend)
Sets whether to use the Ant
<depend> task. |
void |
setVerbose(boolean verbose)
Sets whether to produce verbose output.
|
void |
setWarnings(boolean warnings)
Sets whether to log warning messages.
|
define
public boolean isFailOnError()
true
.@Input public boolean getFailOnError()
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 boolean isDeprecation()
false
.public void setDeprecation(boolean deprecation)
false
.public boolean isWarnings()
true
.public void setWarnings(boolean warnings)
true
.@Input @Optional public String getEncoding()
null
, in which
case the platform default encoding will be used.public void setEncoding(String encoding)
null
, in which
case the platform default encoding will be used.public boolean isOptimize()
useAnt
is true
.
Note that this flag is ignored by Sun's javac starting with JDK 1.3.@Input public boolean getOptimize()
useAnt
is true
.
Note that this flag is ignored by Sun's javac starting with JDK 1.3.public void setOptimize(boolean optimize)
useAnt
is true
.
Note that this flag is ignored by Sun's javac starting with JDK 1.3.public boolean isDebug()
true
. See DebugOptions.debugLevel
for which debugging information will be generated.@Input public boolean getDebug()
true
. See DebugOptions.debugLevel
for which debugging information will be generated.public void setDebug(boolean debug)
true
. See DebugOptions.debugLevel
for which debugging information will be generated.public DebugOptions getDebugOptions()
public void setDebugOptions(DebugOptions debugOptions)
public boolean isFork()
false
.public void setFork(boolean fork)
false
.public ForkOptions getForkOptions()
public void setForkOptions(ForkOptions forkOptions)
public boolean isUseDepend()
<depend>
task.
Only takes effect if useAnt
is true
. Defaults to
false
.public void setUseDepend(boolean useDepend)
<depend>
task.
Only takes effect if useAnt
is true
. Defaults to
false
.public DependOptions getDependOptions()
<depend>
task.public void setDependOptions(DependOptions dependOptions)
<depend>
task.@Deprecated @Input @Optional public String getCompiler()
CompileOptions.forkOptions.executable
insteaduseAnt
is true
.@Deprecated public void setCompiler(String compiler)
CompileOptions.forkOptions.executable instead
useAnt
is true
.public boolean isIncludeJavaRuntime()
useAnt
is true
. Defaults to false
.@Input public boolean getIncludeJavaRuntime()
useAnt
is true
. Defaults to false
.public void setIncludeJavaRuntime(boolean includeJavaRuntime)
useAnt
is true
. Defaults to false
.@Input @Optional public String getBootClasspath()
fork
is true
. Defaults to null
.public void setBootClasspath(String bootClasspath)
fork
is true
. Defaults to null
.@Input @Optional public String getExtensionDirs()
fork
is true
. Defaults to null
.public void setExtensionDirs(String extensionDirs)
fork
is true
. Defaults to null
.@Input public List<String> getCompilerArgs()
public void setCompilerArgs(List<String> compilerArgs)
public boolean isUseAnt()
false
.public void setUseAnt(boolean useAnt)
false
.public CompileOptions fork(Map<String,Object> forkArgs)
ForkOptions
with named parameter syntax.
Calling this method will set fork
to true
.public CompileOptions debug(Map<String,Object> debugArgs)
DebugOptions
with named parameter syntax.
Calling this method will set debug
to true
.public CompileOptions depend(Map<String,Object> dependArgs)
DependOptions
with named parameter syntax.
Calling this method will set useDepend
to true
.protected List<String> excludedFieldsFromOptionMap()
excludedFieldsFromOptionMap
in class AbstractOptions
protected Map<String,String> fieldName2AntMap()
fieldName2AntMap
in class AbstractOptions
protected Map<String,? extends Callable<Object>> fieldValue2AntMap()
fieldValue2AntMap
in class AbstractOptions
public Map<String,Object> optionMap()
optionMap
in class AbstractOptions