generated from Anuken/MindustryJavaModTemplate
-
Notifications
You must be signed in to change notification settings - Fork 11
/
settings.gradle
42 lines (39 loc) · 1.75 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
pluginManagement{
repositories{
gradlePluginPortal()
maven{url 'https://jitpack.io'}
}
}
if(JavaVersion.current().ordinal() < JavaVersion.VERSION_17.ordinal()){
throw new GradleException("JDK 17 is a required minimum version. Yours: ${System.getProperty('java.version')}")
}
rootProject.name = modName
def name = 'MindustryBlackHoleRenderer'
if(new File(rootDir.parent, name).exists()){
println("Compiling with local Black Hole Library")
includeBuild("../${name}"){
dependencySubstitution{sub ->
sub.all{
if(it.requested instanceof ModuleComponentSelector){
def req = it.requested as ModuleComponentSelector
if(Boolean.valueOf(mindustryBE) && req.group == 'com.github.Anuken.Mindustry'){
useTarget "com.github.Anuken.MindustryJitpack:$req.module:$mindustryBEVersion"
}else if(req.group == 'com.github.Anuken.Arc'){
useTarget "com.github.Anuken.Arc:$req.module:$arcVersion"
}else if(req.group.startsWith('com.github.MEEPofFaith')){
def group = req.group.substring('com.github.MEEPofFaith'.length())
if(group.isEmpty() && req.module == name){
useTarget sub.project(':')
}else if(!group.isEmpty() && group.substring(1) == name){
if(req.module.endsWith('.gradle.plugin')){
useTarget sub.project(':')
}else{
useTarget sub.project(":$req.module")
}
}
}
}
}
}
}
}