forked from Anuken/Mindustry
-
Notifications
You must be signed in to change notification settings - Fork 5
/
settings.gradle
72 lines (63 loc) · 2.43 KB
/
settings.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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"]}")
}
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){
//hack: pretend the Android module doesn't exist when imported through IntelliJ
//why? because IntelliJ chokes on the new version of the Android plugin
//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{
println("No Android SDK found. Skipping 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:g3d',
':Arc:extensions:fx',
':Arc:extensions:flabel',
':Arc:extensions:discord',
':Arc:extensions:profiling',
':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',
':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.")
}