...
Existing Ant Users (Groovy or mixed Groovy/Java Projects): If you wish to pre-compile your Groovy scripts as part of your build process (it can help catch syntactic errors earlier if you do) then you need to know about the Groovyc ant task The groovyc Ant Task. You will find it almost identical to the javac task which you are probably already familiar with.
...