Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 3742114

Browse files
committed
Added versioning support for revision
1 parent e30508a commit 3742114

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

build.gradle

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ tasks.create(name: 'build') {
2525
group = 'build'
2626
}
2727

28+
def versionObj = new Version(major: 2, minor: 1, revision: 1)
29+
2830
allprojects {
2931
apply plugin: 'maven-publish'
3032
apply plugin: 'com.jfrog.bintray'
3133
apply plugin: 'com.github.johnrengelman.shadow'
3234

3335
group = 'com.jagrosh'
34-
version = '2.1'
36+
version = "$versionObj"
3537

3638
project.ext {
3739
jdaVersion = '3.5.0_335'
@@ -283,3 +285,16 @@ publishing {
283285
}
284286
}
285287
}
288+
289+
class Version {
290+
String major, minor, revision
291+
292+
String release() {
293+
return "${major}.${minor}"
294+
}
295+
296+
@Override
297+
String toString() {
298+
return "${major}.${minor}.${revision}"
299+
}
300+
}

0 commit comments

Comments
 (0)