93
|
1
|
|
2 def targets = 'clean default'
|
|
3 if (args) {
|
|
4 targets = args.join(' ')
|
|
5 }
|
|
6
|
|
7 new File('.').traverse([type: groovy.io.FileType.DIRECTORIES, maxDepth:2]) { project ->
|
|
8 def script = new File(project,'build.xml')
|
|
9 if (script.exists() ) {
|
|
10
|
|
11 def out = new StringBuffer()
|
|
12 def err = new StringBuffer()
|
|
13 println "-" * 50
|
|
14 println "processing: $script ($targets)"
|
|
15 def proc = "cmd /C ant $targets".execute(null,project)
|
|
16 proc.consumeProcessOutput(out,out)
|
|
17 proc.waitForOrKill(480 * 1000)
|
|
18 new File(project,"build.log").text = out.toString()
|
|
19 println out
|
|
20 }
|
|
21 }
|