Skip to content

Commit

Permalink
Disable version inference when no git history present (Fixes #256)
Browse files Browse the repository at this point in the history
  • Loading branch information
hierynomus committed Dec 28, 2016
1 parent 0ad5170 commit 516abb0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 516abb0

Please sign in to comment.