Mindustry/settings.gradle

67 lines
2.1 KiB
Groovy
Raw Normal View History

2021-06-14 21:55:28 +07: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 22:19:38 +07:00
}
2019-09-08 03:55:09 +07:00
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'
2020-03-25 11:18:40 +07:00
def use = { ... names ->
for(String name : names){
include(name)
project(name).projectDir = new File(settingsDir, "../${name.substring(1).replace(":", "/")}")
}
2018-12-27 01:22:31 +07:00
}
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){
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
2019-03-24 00:40:13 +07:00
if(!hasProperty("release")){
2019-04-08 20:03:18 +07:00
if(new File(settingsDir, '../Arc').exists()){
2020-03-25 11:18:40 +07:00
use(
2020-04-30 05:29:19 +07:00
':Arc',
':Arc:arc-core',
':Arc:extensions',
':Arc:extensions:freetype',
':Arc:extensions:recorder',
':Arc:extensions:arcnet',
2020-03-25 11:18:40 +07:00
':Arc:extensions:packer',
':Arc:extensions:g3d',
2020-04-30 05:29:19 +07:00
':Arc:extensions:fx',
2021-06-02 22:08:08 +07:00
':Arc:extensions:flabel',
':Arc:extensions:discord',
':Arc:extensions:profiling',
2020-04-30 05:29:19 +07:00
':Arc:natives',
':Arc:natives:natives-desktop',
':Arc:natives:natives-android',
':Arc:natives:natives-ios',
':Arc:natives:natives-freetype-desktop',
':Arc:natives:natives-freetype-android',
':Arc:natives:natives-freetype-ios',
':Arc:backends',
':Arc:backends:backend-sdl',
2020-03-25 11:18:40 +07:00
':Arc:backends:backend-android',
':Arc:backends:backend-robovm',
':Arc:backends:backend-headless'
)
2017-12-25 08:50:00 +07:00
}
2020-04-30 05:29:19 +07:00
2019-09-22 03:44:47 +07:00
if(new File(settingsDir, '../Mindustry-Debug').exists()){
include(":debug")
project(":debug").projectDir = new File(settingsDir, "../Mindustry-Debug")
2018-09-11 06:33:12 +07:00
}
2017-12-25 08:50:00 +07:00
}else{
println("Not including local repositories.")
2017-12-22 09:56:01 +07:00
}