<p>I have to include Groovy classes into existing Java apps, and include Groovy into Ant's <code>build.xml</code> file.</p>

<p>What is the best way to configure Ant's <code>build.xml</code> for it? </p>

<p>Update: Are there more specifics in combining Java and Groovy compilations? Sequence of tasks?</p>

To use Groovy in your ant script, you basically have to
declare the Groovy ant task
:
```
```
<project name="groovy-build" default="listSourceFiles">

<taskdef name="groovy"
     classname="org.codehaus.groovy.ant.Groovy"/>
<groovy>
    ant.... // some ant groovy directives
</groovy>
</target>
</project>
```
```
However, you have to be careful, in your ant.xml, to refer to fileset within your
current target
.