diff --git a/build.gradle b/build.gradle index d2bdb1b6..66dc3edc 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,7 @@ buildscript { } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' + classpath 'org.ajoberstar:gradle-git:0.10.1' } } @@ -22,6 +23,14 @@ version = config.mc_version + "-" + config.mod_version + "-" + config.build_numb group= config.package_group archivesBaseName = config.mod_name +import org.ajoberstar.grgit.Grgit + +def gitHash = 'unknown' +if (new File(projectDir, '.git').exists()) { + def repo = Grgit.open(project.file('.')) + gitHash = repo.log().find().abbreviatedId +} + repositories { maven { name 'CB Maven FS' @@ -68,6 +77,13 @@ processResources { jar { dependsOn "incrementBuildNumber" classifier = '' + manifest.mainAttributes( + "Built-By": System.getProperty('user.name'), + "Created-By": "${System.getProperty('java.vm.version')} + (${System.getProperty('java.vm.vendor')})", + "Implementation-Title": project.name, + "Implementation-Version": project.version, + "Git-Hash": gitHash + ) } // add a source jar diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 0087cd3b..3d0dee6e 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 662430a8..b0dd98c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue May 06 21:57:37 CEST 2014 +#Fri Sep 26 11:20:52 CDT 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip