|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMatchingTask
org.codehaus.groovy.ant.Groovyc
Compiles Groovy source files. This task can take the following arguments:
When this task executes, it will recursively scan the sourcedir 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 | |
private Path |
compileClasspath
|
protected java.io.File[] |
compileList
|
private Path |
compileSourcepath
|
private CompilerConfiguration |
configuration
|
private java.io.File |
destDir
|
private java.lang.String |
encoding
|
protected boolean |
failOnError
|
protected boolean |
listFiles
|
private Path |
src
|
Constructor Summary | |
Groovyc()
|
Method Summary | |
protected void |
checkParameters()
|
protected void |
compile()
|
Path |
createClasspath()
Adds a path to the classpath. |
java.lang.String |
createEncoding()
|
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. |
java.io.File |
getDestdir()
Gets the destination directory into which the java source files should be compiled. |
java.lang.String |
getEncoding()
|
boolean |
getFailonerror()
Gets the failonerror flag. |
java.io.File[] |
getFileList()
Gets the list of files to be compiled. |
boolean |
getListfiles()
Get the listfiles flag. |
Path |
getSourcepath()
Gets the sourcepath to be used for this compilation. |
Path |
getSrcdir()
Gets the source dirs to find the source java files. |
protected Path |
recreateSrc()
Recreate src. |
protected void |
resetFileLists()
Clear the list of files to be compiled and copied.. |
protected void |
scanDir(java.io.File srcDir,
java.io.File destDir,
java.lang.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(java.io.File destDir)
Set the destination directory into which the Java source files should be compiled. |
void |
setEncoding(java.lang.String encoding)
|
void |
setFailonerror(boolean fail)
Indicates whether the build will continue even if there are compilation errors; defaults to true. |
void |
setListfiles(boolean list)
If true, list the source files being handed off to the compiler. |
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 |
setVerbose(boolean verbose)
Enable verbose compiling which will display which files are being compiled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private CompilerConfiguration configuration
private Path src
private java.io.File destDir
private Path compileClasspath
private Path compileSourcepath
private java.lang.String encoding
protected boolean failOnError
protected boolean listFiles
protected java.io.File[] compileList
Constructor Detail |
public Groovyc()
Method Detail |
public Path createSrc()
protected Path recreateSrc()
public void setSrcdir(Path srcDir)
srcDir
- the source directories as a pathpublic Path getSrcdir()
public void setDestdir(java.io.File destDir)
destDir
- the destination directorpublic void setVerbose(boolean verbose)
verbose
- public java.io.File getDestdir()
public void setSourcepath(Path sourcepath)
sourcepath
- the source pathpublic Path getSourcepath()
public Path createSourcepath()
public void setSourcepathRef(Reference r)
r
- a reference to a source pathpublic void setClasspath(Path classpath)
classpath
- an Ant Path object containing the compilation classpath.public Path getClasspath()
public Path createClasspath()
public void setClasspathRef(Reference r)
r
- a reference to a classpathpublic java.lang.String createEncoding()
public void setEncoding(java.lang.String encoding)
public java.lang.String getEncoding()
public void setListfiles(boolean list)
list
- if true list the source filespublic boolean getListfiles()
public void setFailonerror(boolean fail)
fail
- if true halt the build on failurepublic void setProceed(boolean proceed)
proceed
- inverse of failoferrorpublic boolean getFailonerror()
public void execute() throws BuildException
BuildException
- if an error occursprotected void resetFileLists()
protected void scanDir(java.io.File srcDir, java.io.File destDir, java.lang.String[] files)
srcDir
- The source directorydestDir
- The destination directoryfiles
- An array of filenamespublic java.io.File[] getFileList()
protected void checkParameters() throws BuildException
BuildException
protected void compile()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |