mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-11-11 03:31:19 +03:00
68 lines
2.1 KiB
Groovy
68 lines
2.1 KiB
Groovy
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"]}")
|
|
}
|
|
|
|
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'
|
|
|
|
def use = { ... names ->
|
|
for(String name : names){
|
|
include(name)
|
|
project(name).projectDir = new File(settingsDir, "../${name.substring(1).replace(":", "/")}")
|
|
}
|
|
}
|
|
|
|
def hasSdk = System.getenv("ANDROID_HOME") != null
|
|
|
|
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
|
|
}
|
|
|
|
if(System.getenv("JITPACK") == "true") hasSdk = false
|
|
|
|
if(hasSdk){
|
|
include 'android'
|
|
}else{
|
|
println("No local.properties found. Not loading Android module.")
|
|
}
|
|
|
|
if(!hasProperty("release")){
|
|
if(new File(settingsDir, '../Arc').exists()){
|
|
use(
|
|
':Arc',
|
|
':Arc:arc-core',
|
|
':Arc:extensions',
|
|
':Arc:extensions:freetype',
|
|
':Arc:extensions:recorder',
|
|
':Arc:extensions:arcnet',
|
|
':Arc:extensions:packer',
|
|
':Arc:extensions:box2d',
|
|
':Arc:extensions:g3d',
|
|
':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',
|
|
':Arc:natives:natives-box2d-ios',
|
|
':Arc:backends',
|
|
':Arc:backends:backend-sdl',
|
|
':Arc:backends:backend-android',
|
|
':Arc:backends:backend-robovm',
|
|
':Arc:backends:backend-headless'
|
|
)
|
|
}
|
|
|
|
if(new File(settingsDir, '../Mindustry-Debug').exists()){
|
|
include(":debug")
|
|
project(":debug").projectDir = new File(settingsDir, "../Mindustry-Debug")
|
|
}
|
|
}else{
|
|
println("Not including local repositories.")
|
|
}
|