-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
settings.gradle
63 lines (54 loc) · 1.47 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import java.nio.file.Files
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven {
name "Quilt"
url "https://maven.quiltmc.org/repository/snapshot"
}
maven {
name "Quilt"
url "https://maven.quiltmc.org/repository/release"
}
maven {
name "Fabric"
url "https://maven.fabricmc.net"
}
}
}
rootProject.name = "qsl"
// Build logic is an included build for holding the convention plugins for generating libraries and modules.
includeBuild("build-logic")
// Libraries
library("core")
library("block")
library("data")
library("entity")
library("rendering")
library("gui")
library("item")
library("management")
library("worldgen")
library("misc")
def library(String library) {
include(library)
def libraryProject = project(":$library")
libraryProject.projectDir = file("library/$library")
if (Files.exists(libraryProject.projectDir.toPath().resolve("DISABLE"))) {
return
}
rootProject.projectDir.toPath().resolve("library/$library/").toFile().listFiles().each {
// Is the module disabled?
if (it.isDirectory()
&& it.name != "src" // Ignore sources
&& it.name != "build" // Ignore build artifacts
&& !it.name.startsWith(".") // Ignore anything hidden on unix-like OSes
) {
// Libraries can be disabled by adding a file named DISABLE at the root of its directory
if (Files.exists(it.toPath().resolve("build.gradle")) && Files.notExists(it.toPath().resolve("DISABLE"))) {
include "$library:$it.name"
}
}
}
}