You seem to be missing a semicolon at the end of your script. 2. The ant script task expects either a src attribute, or a script body, not both. 3. You might find groovy’s slashy strings or multiline strings are handy in this situation (http://groovy.codehaus.org/Strings+and+GString)
If the ant script task expects either a src or a body, there is no way to straight-up move from the old ant tag to gradle’s version, I guess?
Anyway, I decided fighting the grammar was too much work - I just include the script as before, and inside the script the last thing that happens is that I run the method. The params are luckily constants anyway.