Skip to content

Commit 6aa3b3c

Browse files
committed
inject version at build time
1 parent 14b953b commit 6aa3b3c

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

build.gradle

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
def isDirty = { ->
2-
def stdout = new ByteArrayOutputStream()
3-
exec {
4-
commandLine 'git', 'status', '--porcelain'
5-
standardOutput = stdout
6-
}
7-
return stdout.toString().trim()
8-
}
9-
def getVersionName = { ->
10-
def stdout = new ByteArrayOutputStream()
11-
exec {
12-
commandLine 'git', 'describe', '--tags'
13-
standardOutput = stdout
14-
}
15-
def gitVersionName = stdout.toString().trim()
16-
return isDirty() ? gitVersionName + '-SNAPSHOT' : gitVersionName
17-
}
18-
version = getVersionName()
19-
201
repositories {
212
mavenCentral()
223
}

0 commit comments

Comments
 (0)