Mindustry/settings.gradle

39 lines
1.4 KiB
Groovy
Raw Permalink Normal View History

if(JavaVersion.current().ordinal() < JavaVersion.VERSION_17.ordinal()){
throw new Exception("!!! YOU MUST USE JAVA 17 OR ABOVE TO COMPILE AND RUN MINDUSTRY !!! Read the README. Your version: ${System.properties["java.version"]}")
2020-09-30 22:19:38 +07:00
}
2019-09-08 03:55:09 +07:00
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'
2020-03-29 04:03:52 +07:00
def hasSdk = System.getenv("ANDROID_HOME") != null
2020-03-29 04:03:52 +07: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-29 04:03:52 +07: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-12-01 10:52:33 +07:00
//UPDATE: it no longer chokes on AGP with the latest version, but instead gives a completely different error. brilliant.
2024-04-28 20:26:02 +07:00
include 'android'
}else{
2020-08-29 09:05:07 +07:00
println("No Android SDK found. Skipping Android module.")
}
2017-12-22 04:46:33 +07:00
2023-10-31 01:56:40 +07:00
if(!hasProperty("release") && !hasProperty("noLocalArc")){
if(new File(rootDir.parent, 'Arc').exists()){
println("Compiling with localArc")
includeBuild("../Arc")
2017-12-25 08:50:00 +07:00
}
2020-04-30 05:29:19 +07:00
2023-10-31 01:56:40 +07:00
if(new File(rootDir.parent, 'Mindustry-Debug').exists()){
2019-09-22 03:44:47 +07:00
include(":debug")
2023-10-31 01:56:40 +07:00
project(":debug").projectDir = new File(rootDir.parent, "Mindustry-Debug")
2018-09-11 06:33:12 +07:00
}
2017-12-25 08:50:00 +07:00
}else{
println("Not including local repositories.")
2023-10-31 01:56:40 +07:00
}