Files
Mindustry/settings.gradle

68 lines
2.1 KiB
Groovy
Raw Normal View History

2020-04-02 22:45:13 -04:00
if(JavaVersion.current() != JavaVersion.VERSION_1_8){
throw new GradleException("!!! YOU MUST USE JAVA 8 TO COMPILE AND RUN MINDUSTRY !!! Read the README. Your version: ${System.properties["java.version"]}")
}
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){
include 'android'
}else{
println("No local.properties found. Not loading Android module.")
}
2017-12-21 13:46:33 -08:00
2019-03-23 13:40:13 -04:00
if(!hasProperty("release")){
2019-04-08 09:03:18 -04:00
if(new File(settingsDir, '../Arc').exists()){
2020-03-25 00:18:40 -04:00
use(
2020-04-29 18:29:19 -04:00
':Arc',
':Arc:arc-core',
':Arc:extensions',
':Arc:extensions:freetype',
':Arc:extensions:recorder',
':Arc:extensions:arcnet',
2020-03-25 00:18:40 -04:00
':Arc:extensions:packer',
':Arc:extensions:box2d',
2020-03-25 00:18:40 -04:00
':Arc:extensions:g3d',
2020-04-29 18:29:19 -04:00
':Arc:extensions:fx',
':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:natives:natives-box2d-desktop',
':Arc:natives:natives-box2d-android',
2020-04-30 22:56:43 -04:00
':Arc:natives:natives-box2d-ios',
2020-04-29 18:29:19 -04:00
':Arc:backends',
':Arc:backends:backend-sdl',
2020-03-25 00:18:40 -04:00
':Arc:backends:backend-android',
':Arc:backends:backend-robovm',
':Arc:backends:backend-headless'
)
2017-12-24 20:50:00 -05:00
}
2020-04-29 18:29:19 -04:00
2019-09-21 16:44:47 -04:00
if(new File(settingsDir, '../Mindustry-Debug').exists()){
include(":debug")
project(":debug").projectDir = new File(settingsDir, "../Mindustry-Debug")
2018-09-10 19:33:12 -04:00
}
2017-12-24 20:50:00 -05:00
}else{
println("Not including local repositories.")
2017-12-21 21:56:01 -05:00
}