Files
Mindustry/settings.gradle

48 lines
1.7 KiB
Groovy
Raw Normal View History

2021-06-14 10:55:28 -04:00
if(JavaVersion.current().ordinal() < JavaVersion.VERSION_16.ordinal()){
throw new Exception("!!! YOU MUST USE JAVA 16 OR ABOVE TO COMPILE AND RUN MINDUSTRY !!! Read the README. Your version: ${System.properties["java.version"]}")
2020-09-30 11:19:38 -04:00
}
2019-09-07 16:55:09 -04:00
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'
2020-03-25 00:18:40 -04:00
def use = { ... names ->
for(String name : names){
include(name)
project(name).projectDir = new File(settingsDir, "../${name.substring(1).replace(":", "/")}")
}
2018-12-26 13:22:31 -05:00
}
2020-03-28 17:03:52 -04:00
def hasSdk = System.getenv("ANDROID_HOME") != null
2020-03-28 17:03:52 -04:00
if(new File(settingsDir, 'local.properties').exists()){
def properties = new Properties()
properties.load(new File(settingsDir, 'local.properties').newDataInputStream())
if(properties.containsKey("sdk.dir")) hasSdk = true
}
2020-03-28 17:03:52 -04:00
if(System.getenv("JITPACK") == "true") hasSdk = false
if(hasSdk){
//hack: pretend the Android module doesn't exist when imported through IntelliJ
//why? because IntelliJ chokes on the new version of the Android plugin
2021-11-30 22:52:33 -05:00
//UPDATE: it no longer chokes on AGP with the latest version, but instead gives a completely different error. brilliant.
if(!System.getProperty("jna.tmpdir")?.contains("JetBrains")){
include 'android'
}
}else{
2020-08-28 21:05:07 -05:00
println("No Android SDK found. Skipping Android module.")
}
2017-12-21 13:46:33 -08:00
2023-10-30 14:56:40 -04:00
if(!hasProperty("release") && !hasProperty("noLocalArc")){
if(new File(rootDir.parent, 'Arc').exists()){
println("Compiling with localArc")
includeBuild("../Arc")
2017-12-24 20:50:00 -05:00
}
2020-04-29 18:29:19 -04:00
2023-10-30 14:56:40 -04:00
if(new File(rootDir.parent, 'Mindustry-Debug').exists()){
2019-09-21 16:44:47 -04:00
include(":debug")
2023-10-30 14:56:40 -04:00
project(":debug").projectDir = new File(rootDir.parent, "Mindustry-Debug")
2018-09-10 19:33:12 -04:00
}
2017-12-24 20:50:00 -05:00
}else{
println("Not including local repositories.")
2023-10-30 14:56:40 -04:00
}