-task setGitBranch(type: Exec) {
- workingDir = jalviewDir
- commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
- standardOutput = new ByteArrayOutputStream()
- project.ext.gitBranch = {
- return standardOutput.toString().trim()
+ def branchStdOut = new ByteArrayOutputStream()
+ exec {
+ commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
+ standardOutput = branchStdOut