/ Published in: Groovy
Way to make ant-like pseudo-targets in groovy AntBuilder
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
DEST = 'target' JAR = "$DEST/myapp.jar" SRC = 'src' ant.taskdef(name: 'groovyc', classname: 'org.codehaus.groovy.ant.Groovyc') compile = { println '\ncompile:' ant.mkdir(dir: DEST) ant.groovyc(destdir: DEST, srcdir: SRC, includes: '**/*.groovy') } jar = { compile() println '\njar:' ant.jar(destfile: JAR, basedir: DEST, includes: '**/*.class') }
URL: groovy_ant_builder_target