File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,18 @@ allprojects {
2828 }
2929
3030 group = ' org.embeddedt'
31- version = gitVersion()
31+ // extract base version from tag, generate other metadata ourselves
32+ def details = versionDetails()
33+ def plusIndex = details. lastTag. indexOf(" +" )
34+ if (plusIndex == -1 ) {
35+ plusIndex = details. lastTag. length()
36+ }
37+ def baseVersion = details. lastTag. substring(0 , plusIndex)
38+ def dirtyMarker = details. isCleanTag ? " " : " .dirty"
39+ def commitHashMarker = details. commitDistance > 0 ? (" ." + details. gitHash) : " "
40+ def preMarker = (details. commitDistance > 0 || ! details. isCleanTag) ? (" -beta." + details. commitDistance) : " "
41+ def versionString = " ${ baseVersion}${ preMarker} +mc${ minecraft_version}${ commitHashMarker}${ dirtyMarker} "
42+ version = versionString
3243 archivesBaseName = rootProject. archives_base_name + ' -' + project. name
3344
3445 sourceCompatibility = targetCompatibility = JavaVersion . VERSION_17
You can’t perform that action at this time.
0 commit comments