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 4dc9f56 commit bc4aa4cCopy full SHA for bc4aa4c
build.gradle
@@ -4,7 +4,6 @@ buildscript {
4
5
plugins {
6
id 'java-library'
7
- id 'com.palantir.git-version' version '0.15.0'
8
id 'maven-publish'
9
}
10
@@ -13,7 +12,7 @@ repositories {
13
12
14
15
group 'uk.co.mainwave.mimetypes'
16
-version gitVersion()
+version getVersionFromGit()
17
18
sourceCompatibility = JavaVersion.VERSION_1_8
19
@@ -37,4 +36,17 @@ publishing {
37
36
from(components.java)
38
39
+}
40
+
41
+def getVersionFromGit() {
42
+ try {
43
+ def stdout = new ByteArrayOutputStream()
44
+ exec {
45
+ commandLine "git", "describe", "--always", "--dirty"
46
+ standardOutput = stdout
47
+ }
48
+ return stdout.toString().trim()
49
+ } catch (ignored) {
50
+ return "1.0.0"
51
52
0 commit comments