mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Weird hack for java6. I hope it works.
This commit is contained in:
parent
698a610eaa
commit
a1680886a4
@ -38,9 +38,12 @@ if (!project.hasProperty("artifactory_password")) ext.artifactory_password = ""
|
|||||||
|
|
||||||
if (!project.hasProperty("gitCommitHash") && !JavaVersion.current().isJava6()) {
|
if (!project.hasProperty("gitCommitHash") && !JavaVersion.current().isJava6()) {
|
||||||
try {
|
try {
|
||||||
def repo = org.ajoberstar.grgit.Grgit.open(project.file('.'))
|
def Grgit = Class.forName("org.ajoberstar.grgit.Grgit");
|
||||||
|
def Grgit_open = Grgit.getDeclaredMethod("open", File.class)
|
||||||
|
def repo = Grgit_open.invoke(null, project.file('.'))
|
||||||
ext.gitCommitHash = repo.head().abbreviatedId
|
ext.gitCommitHash = repo.head().abbreviatedId
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
println "Error getting commit hash: " + e.getMessage()
|
||||||
ext.gitCommitHash = "no_git_id"
|
ext.gitCommitHash = "no_git_id"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user