forked from Islandora-Devops/isle-buildkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
23 lines (22 loc) · 1.01 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
rootProject.name = "isle-buildkit"
// Include any folder that has a Dockerfile as a sub-project.
rootProject.projectDir
.walk()
.maxDepth(1) // Only immediate directories.
.filter { it.isDirectory && it.resolve("Dockerfile").exists() } // Must have a Dockerfile.
.forEach { docker ->
// Include as a sub-project.
include(docker.relativeTo(rootProject.projectDir).path)
// Include any tests as sub-projects of the docker project.
val tests = docker.resolve("tests")
if (tests.isDirectory) {
include(tests.relativeTo(rootProject.projectDir).path.replace("/", ":"))
// Add any sub-folders that container project files as well.
tests
.walk()
.filter { it.isDirectory && (it.resolve("build.gradle.kts").exists() || it.resolve("docker-compose.yml").exists())}
.forEach {
include(it.relativeTo(rootProject.projectDir).path.replace("/", ":"))
}
}
}