annotate scripts/antall.groovy @ 263:0a6a5a7470c4

add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
author smith@nwoca.org
date Tue, 13 Nov 2018 18:14:45 +0000
parents f351338a3b3a
children
rev   line source
93
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
1
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
2 def targets = 'clean default'
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
3 if (args) {
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
4 targets = args.join(' ')
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
5 }
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
6
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
7 new File('.').traverse([type: groovy.io.FileType.DIRECTORIES, maxDepth:2]) { project ->
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
8 def script = new File(project,'build.xml')
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
9 if (script.exists() ) {
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
10
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
11 def out = new StringBuffer()
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
12 def err = new StringBuffer()
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
13 println "-" * 50
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
14 println "processing: $script ($targets)"
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
15 def proc = "cmd /C ant $targets".execute(null,project)
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
16 proc.consumeProcessOutput(out,out)
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
17 proc.waitForOrKill(480 * 1000)
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
18 new File(project,"build.log").text = out.toString()
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
19 println out
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
20 }
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
21 }