forked from mockito/mockito
-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.gradle.kts
40 lines (34 loc) · 1.15 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
include("deprecatedPluginsTest",
"inline",
"extTest",
"kotlinTest",
"kotlinReleaseCoroutinesTest",
"android",
"junit-jupiter",
"junitJupiterExtensionTest",
"module-test",
"memory-test",
"errorprone",
"junitJupiterParallelTest")
rootProject.name = "mockito"
val koltinBuildScriptProject = hashSetOf("junitJupiterExtensionTest")
fun buildFileExtensionFor(projectName: String) =
if (projectName in koltinBuildScriptProject) ".gradle.kts" else ".gradle"
fun buildFileFor(projectName: String) =
"$projectName${buildFileExtensionFor(projectName)}"
rootProject.children.forEach { project ->
val projectDirName = "subprojects/${project.name}"
project.projectDir = File(settingsDir, projectDirName)
project.buildFileName = buildFileFor(project.name)
require(project.projectDir.isDirectory) {
"Project directory ${project.projectDir} for project ${project.name} does not exist."
}
require(project.buildFile.isFile) {
"Build file ${project.buildFile} for project ${project.name} does not exist."
}
}
buildCache {
local {
isEnabled = !System.getenv().containsKey("CI")
}
}