Advertisement
xcooper

Groovy integrate Ant tasks

Jul 15th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.29 KB | None | 0 0
  1. apply plugin: 'java'
  2.  
  3. def antBuild = ant.import(file: file('build.xml'), optional: false)
  4. def antProject = antBuild.project
  5. def antTargets = antProject.targets
  6.  
  7. antTargets.each { targetName, target ->
  8.     task "ant.$targetName" {
  9.         group = 'ant'
  10.         doLast {
  11.             target.execute()
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement