|
Groovy 1.7.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
org.codehaus.groovy.ant.Groovyc
class Groovyc extends MatchingTask
Compiles Groovy source files. This task can take the following arguments:
When this task executes, it will recursively scan srcdir and destdir looking for Groovy source files to compile. This task makes its compile decision based on timestamp.
Based heavily on the Javac implementation in Ant.
Field Summary | |
---|---|
protected File[] |
compileList
|
protected CompilerConfiguration |
configuration
|
protected boolean |
failOnError
|
protected boolean |
listFiles
|
Constructor Summary | |
Groovyc()
|
Method Summary | |
---|---|
void
|
addConfiguredJavac(Javac javac)
Add the configured nested javac task if present to initiate joint compilation. |
protected void
|
addToCompileList(File[] newFiles)
|
protected GroovyClassLoader
|
buildClassLoaderFor()
|
protected void
|
checkParameters()
|
protected void
|
compile()
|
Path
|
createClasspath()
Adds a path to the classpath. |
Path
|
createSourcepath()
Adds a path to sourcepath. |
Path
|
createSrc()
Adds a path for source compilation. |
void
|
execute()
Executes the task. |
Path
|
getClasspath()
Gets the classpath to be used for this compilation. |
File
|
getDestdir()
Gets the destination directory into which the java source files should be compiled. |
String
|
getEncoding()
Returns the encoding to be used when creating files. |
boolean
|
getFailonerror()
Gets the failonerror flag. |
File[]
|
getFileList()
Gets the list of files to be compiled. |
boolean
|
getIncludeantruntime()
Gets whether or not the ant classpath is to be included in the classpath. |
boolean
|
getIncludejavaruntime()
Gets whether or not the java runtime should be included in this task's classpath. |
boolean
|
getListfiles()
Get the listfiles flag. |
String
|
getMemoryInitialSize()
Gets the memoryInitialSize flag. |
String
|
getMemoryMaximumSize()
Gets the memoryMaximumSize flag. |
Path
|
getSourcepath()
Gets the sourcepath to be used for this compilation. |
Path
|
getSrcdir()
Gets the source dirs to find the source java files. |
File
|
getStubdir()
Gets the stub directory into which the Java source stub files should be generated |
boolean
|
getTaskSuccess()
Get the result of the groovyc task (success or failure). |
boolean
|
getVerbose()
Gets the verbose flag. |
boolean
|
isIncludeDestClasses()
Get the value of the includeDestClasses property. |
protected CompilationUnit
|
makeCompileUnit()
|
protected Path
|
recreateSrc()
Recreate src. |
protected void
|
resetFileLists()
Clear the list of files to be compiled and copied.. |
protected void
|
scanDir(File srcDir, File destDir, String[] files)
Scans the directory looking for source files to be compiled. |
void
|
setClasspath(Path classpath)
Set the classpath to be used for this compilation. |
void
|
setClasspathRef(Reference r)
Adds a reference to a classpath defined elsewhere. |
void
|
setDestdir(File destDir)
Set the destination directory into which the Java source files should be compiled. |
void
|
setEncoding(String encoding)
Sets the file encoding for generated files. |
void
|
setErrorProperty(String errorProperty)
The property to set on compilation failure. |
void
|
setFailonerror(boolean fail)
Indicates whether the build will continue even if there are compilation errors; defaults to true. |
void
|
setFork(boolean f)
If true forks the Groovy compiler. |
void
|
setIncludeDestClasses(boolean includeDestClasses)
This property controls whether to include the destination classes directory in the classpath given to the compiler. |
void
|
setIncludeantruntime(boolean include)
If true, includes Ant's own classpath in the classpath. |
void
|
setIncludejavaruntime(boolean include)
If true, includes the Java runtime libraries in the classpath. |
void
|
setJavaHome(File home)
The JDK Home to use when forked. |
void
|
setListfiles(boolean list)
If true, list the source files being handed off to the compiler. |
void
|
setMemoryInitialSize(String memoryInitialSize)
The initial size of the memory for the underlying VM if javac is run externally; ignored otherwise. |
void
|
setMemoryMaximumSize(String memoryMaximumSize)
The maximum size of the memory for the underlying VM if javac is run externally; ignored otherwise. |
void
|
setProceed(boolean proceed)
|
void
|
setSourcepath(Path sourcepath)
Set the sourcepath to be used for this compilation. |
void
|
setSourcepathRef(Reference r)
Adds a reference to a source path defined elsewhere. |
void
|
setSrcdir(Path srcDir)
Set the source directories to find the source Java files. |
void
|
setStacktrace(boolean stacktrace)
Enable compiler to report stack trace information if a problem occurs during compilation. |
void
|
setStubdir(File stubDir)
Set the stub directory into which the Java source stub files should be generated. |
void
|
setUpdatedProperty(String updatedProperty)
The property to set on compilation success. |
void
|
setVerbose(boolean verbose)
Enable verbose compiling which will display which files are being compiled |
Methods inherited from class MatchingTask | |
---|---|
add, setProject, setIncludes, addNot, addAnd, addOr, addContains, createInclude, createIncludesFile, createExclude, createExcludesFile, createPatternSet, XsetItems, setExcludes, XsetIgnore, setDefaultexcludes, setIncludesfile, setExcludesfile, setCaseSensitive, setFollowSymlinks, hasSelectors, selectorCount, getSelectors, selectorElements, appendSelector, addSelector, addNone, addMajority, addDate, addSize, addFilename, addCustom, addPresent, addDepth, addDepend, addContainsRegexp, addDifferent, addType, addModified, log, log, log, log, init, execute, maybeConfigure, getTaskName, getOwningTarget, setRuntimeConfigurableWrapper, getTaskType, setTaskType, setTaskName, setOwningTarget, getRuntimeConfigurableWrapper, reconfigure, perform, bindToOwner, clone, getLocation, getDescription, setLocation, setDescription, getProject, wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Methods inherited from class Task | |
---|---|
log, log, log, log, init, execute, maybeConfigure, getTaskName, getOwningTarget, setRuntimeConfigurableWrapper, getTaskType, setTaskType, setTaskName, setOwningTarget, getRuntimeConfigurableWrapper, reconfigure, perform, bindToOwner, clone, getLocation, getDescription, setLocation, setDescription, getProject, setProject, wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Methods inherited from class ProjectComponent | |
---|---|
clone, log, log, getLocation, getDescription, setLocation, setDescription, getProject, setProject, wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Methods inherited from class Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Field Detail |
---|
protected File[] compileList
protected CompilerConfiguration configuration
protected boolean failOnError
protected boolean listFiles
Constructor Detail |
---|
Groovyc()
Method Detail |
---|
public void addConfiguredJavac(Javac javac)
protected void addToCompileList(File[] newFiles)
protected GroovyClassLoader buildClassLoaderFor()
protected void checkParameters()
protected void compile()
public Path createClasspath()
public Path createSourcepath()
public Path createSrc()
public void execute()
public Path getClasspath()
public File getDestdir()
public String getEncoding()
public boolean getFailonerror()
public File[] getFileList()
public boolean getIncludeantruntime()
public boolean getIncludejavaruntime()
public boolean getListfiles()
public String getMemoryInitialSize()
public String getMemoryMaximumSize()
public Path getSourcepath()
public Path getSrcdir()
public File getStubdir()
public boolean getTaskSuccess()
public boolean getVerbose()
public boolean isIncludeDestClasses()
protected CompilationUnit makeCompileUnit()
protected Path recreateSrc()
protected void resetFileLists()
protected void scanDir(File srcDir, File destDir, String[] files)
public void setClasspath(Path classpath)
public void setClasspathRef(Reference r)
public void setDestdir(File destDir)
public void setEncoding(String encoding)
public void setErrorProperty(String errorProperty)
public void setFailonerror(boolean fail)
public void setFork(boolean f)
public void setIncludeDestClasses(boolean includeDestClasses)
public void setIncludeantruntime(boolean include)
public void setIncludejavaruntime(boolean include)
public void setJavaHome(File home)
public void setListfiles(boolean list)
public void setMemoryInitialSize(String memoryInitialSize)
public void setMemoryMaximumSize(String memoryMaximumSize)
public void setProceed(boolean proceed)
public void setSourcepath(Path sourcepath)
public void setSourcepathRef(Reference r)
public void setSrcdir(Path srcDir)
public void setStacktrace(boolean stacktrace)
public void setStubdir(File stubDir)
public void setUpdatedProperty(String updatedProperty)
public void setVerbose(boolean verbose)
Copyright © 2003-2009 The Codehaus. All rights reserved.