-
Notifications
You must be signed in to change notification settings - Fork 87
/
settings.gradle.kts
50 lines (40 loc) · 1.42 KB
/
settings.gradle.kts
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
rootProject.name = "Terra"
fun includeImmediateChildren(dir: File, type: String) {
dir.walkTopDown().maxDepth(1).forEach {
if (!it.isDirectory || !File(it, "build.gradle.kts").exists()) return@forEach
val addonDir = it.relativeTo(file(".")).path.replace("/", ":").replace("\\", ":")
logger.info("Including $type directory \"$addonDir\" as subproject.")
include(addonDir)
}
}
includeImmediateChildren(file("common/api"), "API")
includeImmediateChildren(file("common/implementation"), "implementation")
includeImmediateChildren(file("common/addons"), "addon")
includeImmediateChildren(file("platforms"), "platform")
includeImmediateChildren(file("platforms/bukkit/nms"), "Bukkit NMS")
include(":platforms:bukkit:common")
pluginManagement {
repositories {
gradlePluginPortal()
maven("https://maven.fabricmc.net") {
name = "Fabric Maven"
}
maven("https://maven.architectury.dev/") {
name = "Architectury Maven"
}
maven("https://files.minecraftforge.net/maven/") {
name = "Forge Maven"
}
maven("https://maven.quiltmc.org/repository/release/") {
name = "Quilt"
}
}
}
// settings.gradle.kts
val isCiServer = System.getenv().containsKey("CI")
// Cache build artifacts, so expensive operations do not need to be re-computed
buildCache {
local {
isEnabled = !isCiServer
}
}