-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
67 lines (60 loc) · 2.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
google()
}
plugins {
// https://plugins.gradle.org/plugin/org.gradle.toolchains.foojay-resolver-convention
id("org.gradle.toolchains.foojay-resolver-convention") version ("0.8.0")
}
}
val PROJECT_NAME = "bluetape4k"
rootProject.name = "$PROJECT_NAME-workshop"
include("shared")
includeModules("aws", false, true)
includeModules("ddd", false, true)
includeModules("docker", false, true)
includeModules("examples", false, false)
includeModules("exposed", false, true)
includeModules("gateway", false, false)
includeModules("gatling", false, true)
includeModules("graalvm", false, false)
includeModules("jmolecules", false, true)
includeModules("json", false, false)
includeModules("kotlin", false, true)
includeModules("mapping", false, true)
includeModules("messaging", false, true)
includeModules("observability", false, false)
includeModules("quarkus", false, true)
includeModules("ratelimit", false, false)
includeModules("reactive", false, true)
includeModules("redis", false, true)
includeModules("spring-boot", false, true)
includeModules("spring-cloud", false, true)
includeModules("spring-data", false, true)
includeModules("spring-modulith", false, true)
includeModules("spring-security/mvc", false, true)
includeModules("spring-security/webflux", false, true)
includeModules("vertx", false, true)
includeModules("virtualthreads", false, true)
fun includeModules(baseDir: String, withProjectName: Boolean = true, withBaseDir: Boolean = true) {
files("$rootDir/$baseDir").files
.filter { it.isDirectory }
.forEach { moduleDir ->
moduleDir.listFiles()
?.filter { it.isDirectory }
?.forEach { dir ->
val basePath = baseDir.replace("/", "-")
val projectName = when {
!withProjectName && !withBaseDir -> dir.name
withProjectName && !withBaseDir -> PROJECT_NAME + "-" + dir.name
withProjectName -> PROJECT_NAME + "-" + basePath + "-" + dir.name
else -> basePath + "-" + dir.name
}
// println("include modules: $projectName")
include(projectName)
project(":$projectName").projectDir = dir
}
}
}