forked from mockito/mockito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
62 lines (53 loc) · 1.8 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
plugins {
id("com.gradle.enterprise").version("3.3.4")
}
include("inline",
"proxy",
"extTest",
"groovyTest",
"kotlinTest",
"kotlinReleaseCoroutinesTest",
"android",
"junit-jupiter",
"junitJupiterExtensionTest",
"junitJupiterInlineMockMakerExtensionTest",
"module-test",
"memory-test",
"errorprone",
"junitJupiterParallelTest",
"osgi-test",
"bom")
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17) && (System.getenv("ANDROID_SDK_ROOT") != null || File(".local.properties").exists())) {
include("androidTest")
} else {
logger.info("Not including android test project due to missing SDK configuration")
}
rootProject.name = "mockito"
val koltinBuildScriptProject = hashSetOf("junitJupiterExtensionTest", "junitJupiterInlineMockMakerExtensionTest")
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."
}
}
//Posting Build scans to https://scans.gradle.com
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
buildCache {
local {
isEnabled = !System.getenv().containsKey("CI")
}
}