Disable version inference when no git history present (Fixes #256)

This commit is contained in:
Jeroen van Erp
2016-12-28 10:09:48 +01:00
parent 0ad51709c2
commit 516abb0282

View File

@@ -53,8 +53,12 @@ license {
excludes(['**/djb/Curve25519.java', '**/sshj/common/Base64.java'])
}
release {
grgit = org.ajoberstar.grgit.Grgit.open(project.projectDir)
if (project.file('.git').isDirectory()) {
release {
grgit = org.ajoberstar.grgit.Grgit.open(project.projectDir)
}
} else {
version = "0.0.0-no.git"
}
// This disables the pedantic doclint feature of JDK8