view scripts/antall.groovy @ 315:7a36ea2cb81a

USASR-5111: Updated dependencies urls.
author Jason Klinger <klinger@nwoca.org>
date Tue, 07 Feb 2023 20:31:59 +0000
parents f351338a3b3a
children
line wrap: on
line source

def targets = 'clean default'
if (args) {
    targets = args.join(' ')
}

new File('.').traverse([type: groovy.io.FileType.DIRECTORIES, maxDepth:2]) { project -> 
    def script = new File(project,'build.xml')            
    if (script.exists() ) {
        
        def out = new StringBuffer()
        def err = new StringBuffer()
        println "-" * 50
        println "processing: $script ($targets)" 
        def proc =  "cmd /C ant $targets".execute(null,project)
        proc.consumeProcessOutput(out,out)
        proc.waitForOrKill(480 * 1000)
        new File(project,"build.log").text = out.toString()               
        println out 
    }
}