mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-12-22 21:24:11 +07:00
Removed '-snapshot' based dependencies
This commit is contained in:
parent
734d4a912b
commit
5b2c8ac337
33
build.gradle
33
build.gradle
@ -1,3 +1,5 @@
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
buildscript{
|
||||
repositories{
|
||||
mavenLocal()
|
||||
@ -12,11 +14,6 @@ buildscript{
|
||||
}
|
||||
}
|
||||
|
||||
//make sure snapshot Arc does not get cached
|
||||
configurations.all {
|
||||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
|
||||
allprojects{
|
||||
apply plugin: "idea"
|
||||
|
||||
@ -29,16 +26,25 @@ allprojects{
|
||||
appName = 'Mindustry'
|
||||
gdxVersion = '1.9.9'
|
||||
roboVMVersion = '2.3.0'
|
||||
uCoreVersion = 'bf399460a6a3656b0ed7cfe398a72befe2b66b42'
|
||||
|
||||
arcHash = null
|
||||
|
||||
localArc = {
|
||||
return (System.properties["release"] == null || System.properties["release"] == "false") && new File(projectDir.parent, '../Arc').exists()
|
||||
}
|
||||
|
||||
getArcHash = {
|
||||
//get latest commit hash from gtihub since JITPack's '-snapshot' version doesn't work correctly
|
||||
if(arcHash == null) arcHash = new JsonSlurper().parseText(new URL("https://api.github.com/repos/Anuken/Arc/commits/master").text)["sha"]
|
||||
return arcHash
|
||||
}
|
||||
|
||||
arcModule = { String name ->
|
||||
def comp = System.properties["release"] == null || System.properties["release"] == "false"
|
||||
|
||||
if(new File(projectDir.parent, '../Arc').exists() && comp){
|
||||
if(localArc()){
|
||||
return project(":Arc:$name")
|
||||
}else{
|
||||
//skip to last submodule
|
||||
if(name.contains(':')) name = name.split(':').last()
|
||||
return "com.github.Anuken.Arc:$name:-SNAPSHOT"
|
||||
return "com.github.Anuken.Arc:$name:${getArcHash()}"
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,7 +188,10 @@ project(":core"){
|
||||
|
||||
dependencies{
|
||||
build.finalizedBy(finish)
|
||||
|
||||
|
||||
//forces JITPack to compile arc and its submodules
|
||||
if(localArc()) compile "com.github.anuken:arc:${getArcHash()}"
|
||||
|
||||
compile arcModule("arc-core")
|
||||
compile arcModule("extensions:freetype")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user