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