From b125ef66683bf24414e61510883bd4f9cef5c9d7 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 20 May 2016 03:32:35 +1000 Subject: [PATCH] Add git revision hash to version --- build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5f0327dd2..cb48fa1a7 100644 --- a/build.gradle +++ b/build.gradle @@ -7,11 +7,17 @@ buildscript { } dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' + classpath 'org.ajoberstar:grgit:1.7.0' } } group = 'com.intellectualcrafters' -version = '3.4.0-SNAPSHOT' +def revision = "" +ext { + git = org.ajoberstar.grgit.Grgit.open(file(".git")) + revision = "-${git.head().abbreviatedId}" +} +version = "3.4.0${revision}" description = """PlotSquared""" subprojects {