-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
42 lines (37 loc) · 1.38 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
plugins {
id("com.gradle.enterprise") version("3.10.3")
}
rootProject.name = "gradle-kotlin-spring-starter"
val apps = File("apps")
val libs = File("libs")
loadSubProjects(listOf(apps, libs))
fun loadSubProjects(modules: List<File>) {
modules.forEach { module ->
if (module.exists()) {
if (module.isDirectory) {
module.listFiles()?.forEach { submodule ->
if (submodule.isDirectory) {
println("Loading submodule \uD83D\uDCE6: ${submodule.name}")
include(":${submodule.name}")
project(":${submodule.name}").projectDir = File("${module.name}/${submodule.name}")
} else {
println("${submodule.name} is not a directory \uD83D\uDDFF - skipping")
}
}
} else {
println("${module.name} is not a directory \uD83D\uDE12 - ${module.name}")
}
} else {
println("${module.name} directory does not exist \uD83D\uDEAB - ${module.name}")
}
}
}
if (!System.getenv("CI").isNullOrEmpty() && !System.getenv("BUILD_SCAN_TOS_ACCEPTED").isNullOrEmpty()) {
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
tag("CI")
}
}
}