File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ plugins{
7
7
id ' com.github.johnrengelman.shadow' version ' 5.2.0'
8
8
}
9
9
10
- project. group = " com.andre601"
11
- project. version = " 3.2.1"
10
+ def ver = new Version (major : 3 , minor : 2 , revision : 1 )
11
+
12
+ group = " com.andre601"
13
+ version = " $ver "
12
14
13
15
sourceCompatibility = JavaVersion . VERSION_1_8
14
16
targetCompatibility = JavaVersion . VERSION_1_8
@@ -76,6 +78,15 @@ publishing{
76
78
}
77
79
}
78
80
79
- task shadowJar {
80
- version = version + " _" + System . getenv(" BUILD_NUMBER" )
81
+ class Version {
82
+ String major, minor, revision
83
+
84
+ static String getBuild (){
85
+ System . getenv(" BUILD_NUMBER" ) ?: System . getProperty(" BUILD_NUMBER" ) ?:
86
+ System . getenv(" GIT_COMMIT" )?. substring(0 , 7 ) ?: System . getProperty(" GIT_COMMIT" )?. substring(0 , 7 ) ?: " dev"
87
+ }
88
+
89
+ String toString (){
90
+ " $major . $minor . ${ revision} _$build "
91
+ }
81
92
}
You can’t perform that action at this time.
0 commit comments