Fix to build.gradle on Eclipse

This commit is contained in:
iadgovuser59 2023-06-14 14:29:59 -04:00
parent 1d00339a78
commit 868ff8fe8c

View File

@ -26,11 +26,12 @@ def buildTime = { ->
} }
def gitHash = { -> def gitHash = { ->
def gitProcess = 'git rev-parse --short HEAD'.execute(); def stdout = new ByteArrayOutputStream()
gitProcess.waitFor(); exec {
def shortHash = gitProcess.text.trim(); commandLine 'git', 'rev-parse', '--short', 'HEAD'
def gitHash = shortHash.substring(0, shortHash.length() - 2); standardOutput = stdout
return gitHash; }
return stdout.toString().trim()
} }
project.ext["jarVersion"] = "${projectVersion}.${buildTime}.${gitHash}" project.ext["jarVersion"] = "${projectVersion}.${buildTime}.${gitHash}"