diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index c660a31..28d0928 100644 --- a/build.gradle +++ b/build.gradle @@ -115,7 +115,11 @@ task createProperties(dependsOn: processResources) { def stdout = new ByteArrayOutputStream() if (project.hasProperty("release")) { - project.version = 1.0 + exec { + commandLine "git", "describe", "--tags", "--abbrev=0" + standardOutput = stdout + } + project.version = stdout.toString().trim().replaceAll("\"", "") } else { exec { commandLine "git", "log", "-n", "1", "--pretty=format:\"%h\"" |