-
Notifications
You must be signed in to change notification settings - Fork 5
/
settings.gradle.kts
78 lines (61 loc) · 1.96 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import java.io.FileFilter
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}
plugins {
kotlin("jvm") version "1.9.20" apply false
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
id("com.gradle.enterprise") version("3.16.1")
}
rootProject.name = "basics"
gradleEnterprise {
if (System.getenv("CI") != null) {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
}
// Data classes used in multiple modules
include("common")
// Core Module, includes the actual Plugin and interfaces for modules
include("core")
// Facades for Bukkit and Paper
include("pipe:facade")
include("pipe:spigot")
include("pipe:paper")
// Actual JavaPlugin
include("plugin")
// Bootstrap plugin, so people don't have to extract a zip file (70% of people would just put it into the plugins folder)
include("bootstrap")
// NMS Modules
include("nms")
include("nms:facade")
include("nms:aggregator")
// Import all NMS versions
val nmsVersionsFolder: Array<File> =
file("nms/versions").listFiles(FileFilter { it.isDirectory })
?: throw RuntimeException("Couldn't find nms/versions folder")
// Add all modules ...
for (nmsVersionFolder in nmsVersionsFolder) {
val moduleName = "nms:versions:" + nmsVersionFolder.name
include(moduleName)
project(":$moduleName").projectDir = nmsVersionFolder
}
// Parent for all modules
include("modules")
// Import subprojects from modules folder
val moduleFolders: Array<File> =
file("modules").listFiles(FileFilter { it.isDirectory })
?: throw RuntimeException("Couldn't find modules folder")
// Add all modules ...
for (moduleFolder in moduleFolders) {
// ... except for _skeletons
if (moduleFolder.name.startsWith("_")) continue
val moduleName = "modules:" + moduleFolder.name
include(moduleName)
project(":$moduleName").projectDir = moduleFolder
}