diff --git a/build.gradle b/build.gradle index 00b2df6b8f..a6f8aaf833 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,3 @@ -import groovy.json.JsonSlurper - buildscript{ repositories{ mavenLocal() @@ -38,8 +36,9 @@ allprojects{ //get latest commit hash from gtihub since JITPack's '-snapshot' version doesn't work correctly if(arcHash == null){ try{ - arcHash = new JsonSlurper().parse(new URL("https://api.github.com/repos/Anuken/Arc/commits/master"))["sha"] + arcHash = 'git ls-remote https://github.com/Anuken/Arc.git'.execute().text.split("\t")[0]//new JsonSlurper().parse(new URL("https://api.github.com/repos/Anuken/Arc/commits/master"))["sha"] }catch(e){ //github can get angry sometimes + e.printStackTrace() arcHash = "-SNAPSHOT"; } }