Skip to content

Commit 39bead7

Browse files
committed
test
1 parent 9b7d26c commit 39bead7

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ configure(allprojects){
4040
localBlackhole = new File(rootDir.parent, 'MindustryBlackHoleRenderer').exists()
4141

4242
blackhole = {String module ->
43-
return "com.github.MEEPofFaith${localBlackhole ? ".MindustryBlackHoleRenderer" : ""}$module:$blackHoleRendererVersion"
43+
return "com.github.MEEPofFaith.MindustryBlackHoleRenderer$module:$blackHoleRendererVersion"
4444
}
4545
}
4646

settings.gradle

+27-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,32 @@ if(JavaVersion.current().ordinal() < JavaVersion.VERSION_17.ordinal()){
1111

1212
rootProject.name = modName
1313

14-
if(new File(rootDir.parent, 'MindustryBlackHoleRenderer').exists()){
14+
def name = 'MindustryBlackHoleRenderer'
15+
if(new File(rootDir.parent, name).exists()){
1516
println("Compiling with local Black Hole Library")
16-
includeBuild("../MindustryBlackHoleRenderer")
17+
includeBuild("../${name}"){
18+
dependencySubstitution{sub ->
19+
sub.all{
20+
if(it.requested instanceof ModuleComponentSelector){
21+
def req = it.requested as ModuleComponentSelector
22+
if(Boolean.valueOf(mindustryBE) && req.group == 'com.github.Anuken.Mindustry'){
23+
useTarget "com.github.Anuken.MindustryJitpack:$req.module:$mindustryBEVersion"
24+
}else if(req.group == 'com.github.Anuken.Arc'){
25+
useTarget "com.github.Anuken.Arc:$req.module:$arcVersion"
26+
}else if(req.group.startsWith('com.github.MEEPofFaith')){
27+
def group = req.group.substring('com.github.MEEPofFaith'.length())
28+
if(group.isEmpty() && req.module == name){
29+
useTarget sub.project(':')
30+
}else if(!group.isEmpty() && group.substring(1) == name){
31+
if(req.module.endsWith('.gradle.plugin')){
32+
useTarget sub.project(':')
33+
}else{
34+
useTarget sub.project(":$req.module")
35+
}
36+
}
37+
}
38+
}
39+
}
40+
}
41+
}
1742
}

0 commit comments

Comments
 (0)