Removed git dependency in build.gradle file
This commit is contained in:
parent
40ad029faf
commit
514c3f4e2b
1 changed files with 13 additions and 6 deletions
|
@ -45,13 +45,20 @@ excludePackage.add('**/LICENSE.txt')
|
||||||
def gitVersion = new ByteArrayOutputStream()
|
def gitVersion = new ByteArrayOutputStream()
|
||||||
|
|
||||||
task getGitVersion {
|
task getGitVersion {
|
||||||
exec {
|
doLast {
|
||||||
commandLine 'git', 'describe', '--always'
|
def result = exec {
|
||||||
|
def command = "git describe --always"
|
||||||
|
ignoreExitValue = true
|
||||||
|
executable "bash" args "-l", "-c", command
|
||||||
standardOutput = gitVersion
|
standardOutput = gitVersion
|
||||||
}
|
}
|
||||||
doLast {
|
if (result.getExitValue() == 0) {
|
||||||
gitVersion = gitVersion.toString().trim()
|
gitVersion = gitVersion.toString().trim()
|
||||||
println("Git version: " + gitVersion)
|
println("Git version: " + gitVersion)
|
||||||
|
} else {
|
||||||
|
gitVersion = "unknown"
|
||||||
|
println("Git not found")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue