mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-10-25 20:22:32 +00:00
Upgradle + Add Manifest
This commit is contained in:
1 parent
487a0ca48f
commit
c988b69e85
3 files changed
+18
-2
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user