-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
48 lines (47 loc) · 1.55 KB
/
settings.gradle.kts
File metadata and controls
48 lines (47 loc) · 1.55 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
pluginManagement {
repositories {
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven {
name = "parchment"
url = uri("https://maven.parchmentmc.org")
}
mavenCentral()
gradlePluginPortal()
}
}
rootProject.name = "felt-api"
try {
val path = rootDir
val strings: List<String> = java.nio.file.Files.lines(File(path,"excluded-folders.txt").toPath()).toList()
for (f in path.listFiles()!!) {
if (f.isDirectory) {
if (!strings.contains(f.name)) {
val subprojects = File(f, "submodules.txt")
if(subprojects.exists()){
val subStrings: List<String> = java.nio.file.Files.lines(subprojects.toPath()).toList()
for (s in subStrings){
val subproject = File(f, s)
if(subproject.exists()){
val src = File(subproject, "src")
if (src.exists()){
include(f.name + ":" + s)
project(":" + f.name + ":" + s).projectDir = subproject
}
}
}
} else {
val src = File(f, "src")
if (src.exists()) {
include(f.name)
}
}
}
}
}
} catch (e: Exception) {
println("Submodule setup failed:")
throw e
}