We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4ed77f commit f320705Copy full SHA for f320705
build.gradle
@@ -20,6 +20,9 @@ allprojects {
20
}
21
22
def commitsSinceLastTag() {
23
+ if (grgit == null) {
24
+ return 0
25
+ }
26
def tags = grgit.tag.list().stream().map({it.commit}).toList()
27
def commit = grgit.head()
28
def depth = 0
@@ -32,7 +35,7 @@ def commitsSinceLastTag() {
32
35
33
36
34
37
ext {
- GIT_COMMIT = grgit.head().abbreviatedId
38
+ GIT_COMMIT = grgit == null ? "unknown" : grgit.head().abbreviatedId
39
GIT_DEPTH = commitsSinceLastTag()
40
41
fullVersion = "${version}-${GIT_COMMIT}".replace("-SNAPSHOT", "-dev+${GIT_DEPTH}")
0 commit comments