Skip to content

Commit 516abb0

Browse files
committed
Disable version inference when no git history present (Fixes #256)
1 parent 0ad5170 commit 516abb0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build.gradle

+6-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ license {
5353
excludes(['**/djb/Curve25519.java', '**/sshj/common/Base64.java'])
5454
}
5555

56-
release {
57-
grgit = org.ajoberstar.grgit.Grgit.open(project.projectDir)
56+
if (project.file('.git').isDirectory()) {
57+
release {
58+
grgit = org.ajoberstar.grgit.Grgit.open(project.projectDir)
59+
}
60+
} else {
61+
version = "0.0.0-no.git"
5862
}
5963

6064
// This disables the pedantic doclint feature of JDK8

0 commit comments

Comments
 (0)