-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
38 lines (35 loc) · 1.24 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
pluginManagement {
includeBuild("gradle/plugins")
repositories {
maven("https://repo.spongepowered.org/repository/maven-public/") { name = "Sponge" }
mavenCentral()
gradlePluginPortal()
}
}
rootProject.name = "littlethings"
thing("annotations")
thing("assertions", "processor")
thing("facets")
thing("json-commands")
thing("todo")
fun thing(module: String, vararg subModules: String) {
include(module)
project(":$module").apply {
projectDir = file("things/$name").apply { mkdirs() }
buildFileName = "$name.gradle.kts"
if (buildFile.createNewFile()) {
buildFile.writeText("plugins { id(\"littlethings.conventions\") }\n\nversion = \"0.1.0\"\n")
projectDir.resolve("src/main/java/dev/denimred/littlethings/$name").mkdirs()
val readme = projectDir.resolve("README.md")
if (readme.createNewFile()) readme.writeText("# $name\n\n[//]: # (TODO: Describe the $name module)")
}
}
subModules.forEach {
include("$module:$it")
project(":$module:$it").apply {
projectDir = file("things/$module/$name").apply { mkdirs() }
buildFileName = "$name.gradle.kts"
buildFile.createNewFile()
}
}
}