forked from MohistMC/Banner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle
38 lines (34 loc) · 938 Bytes
/
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
pluginManagement {
repositories {
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.architectury.dev/" }
maven { url "https://maven.minecraftforge.net/" }
gradlePluginPortal()
}
}
rootProject.name = 'banner'
for (File file in getFile("modules").listFiles()) {
if (isModuleDir(file)) {
String name = file.name
include(name)
ProjectDescriptor project = project(":" + name)
project.projectDir = getFile("modules/" + name)
}
}
// jank! why is this needed??
def getFile(String name) {
return file(name)
}
static def isModuleDir(File file) {
if (file.isDirectory()) {
File[] files = file.listFiles()
if (files != null) {
for (File subFile in files) {
if (subFile.name == "build.gradle") {
return true
}
}
}
}
return false
}