aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2021-01-11 17:44:17 +0100
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2021-01-11 17:44:17 +0100
commitaa72a003f730350172e60ec556e68ebc5de41fc1 (patch)
treefbec57129459a1a49790783fa855f876cb5ca401 /build.gradle.kts
parentbfa9ed104cca51ecfdebd73cef4e911fdcf257e8 (diff)
downloadGT5-Unofficial-aa72a003f730350172e60ec556e68ebc5de41fc1.tar.gz
GT5-Unofficial-aa72a003f730350172e60ec556e68ebc5de41fc1.tar.bz2
GT5-Unofficial-aa72a003f730350172e60ec556e68ebc5de41fc1.zip
Several fixes
Former-commit-id: 85ba0f632541272c8a3072747cb2a3a23d2821ce
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts7
1 files changed, 6 insertions, 1 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 8d144993c0..94850e1f59 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -36,6 +36,7 @@ buildscript {
plugins {
idea
java
+ id("org.ajoberstar.grgit") version("3.1.1")
}
apply(plugin = "forge")
@@ -151,7 +152,7 @@ tasks.withType<Jar> {
// this will ensure that this task is redone when the versions change.
this.inputs.properties += "version" to project.version
this.inputs.properties += "mcversion" to project.minecraft.version
- this.archiveBaseName.set("bartworks[${project.minecraft.version}]")
+ this.archiveBaseName.set("bartworks[${project.minecraft.version}]-[${getVersionAppendage()}]")
// replace stuff in mcmod.info, nothing else
this.filesMatching("/mcmod.info") {
@@ -203,4 +204,8 @@ artifacts {
this.archives(apiJar)
this.archives(sourcesJar)
this.archives(devJar)
+}
+
+fun getVersionAppendage() : String {
+ return org.ajoberstar.grgit.Grgit.open(mapOf("currentDir" to project.rootDir)).log().last().abbreviatedId
} \ No newline at end of file