-
-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathsettings.gradle
More file actions
54 lines (44 loc) · 1.91 KB
/
settings.gradle
File metadata and controls
54 lines (44 loc) · 1.91 KB
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
pluginManagement { // FINISHME: Move all the plugin versions and such here.
repositories {
gradlePluginPortal()
google()
}
plugins {
id "org.jetbrains.kotlin.jvm" version "2.3.20"
}
}
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"]}")
}
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'
def hasSdk = System.getenv("ANDROID_HOME") != null
def localProperties = new Properties()
if(new File(settingsDir, 'local.properties').exists()){
localProperties.load(new File(settingsDir, 'local.properties').newDataInputStream())
if(localProperties.containsKey("sdk.dir")) hasSdk = true
}
if(System.getenv("JITPACK") == "true") hasSdk = false
if(hasSdk){
include 'android'
}else{
println("No Android SDK found. Skipping Android module.")
}
if(hasProperty("localRhino") || localProperties.getOrDefault("localRhino", "false") == "true"){
includeBuild("../rhino")
}
if(!hasProperty("noLocalArc")){
if(new File(rootDir.parent, 'Arc').exists()){
// Make sure that A is capitalized on windows as this will break gradle with a cryptic error otherwise
if (!rootDir.parentFile.list().contains("Arc")) throw new Exception("Local arc folder is lowercase. Please capitalize the A to use local arc.")
println("Compiling with localArc")
includeBuild("../Arc")
}else{
println("Local Arc not found. Cloning https://github.com/Anuken/Arc to a directory next to Mindustry is highly recommended, as jitpack is unreliable.")
}
if(new File(rootDir.parent, 'Mindustry-Debug').exists()){
include(":debug")
project(":debug").projectDir = new File(rootDir.parent, "Mindustry-Debug")
}
}else{
println("Not including local repositories.")
}