-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
settings.gradle.kts
114 lines (100 loc) · 2.72 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import buildparameters.BuildParametersExtension
pluginManagement {
includeBuild("gradle/plugins")
repositories {
gradlePluginPortal()
}
}
plugins {
id("junitbuild.build-parameters")
id("junitbuild.settings-conventions")
}
dependencyResolutionManagement {
repositories {
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots") {
mavenContent {
snapshotsOnly()
}
}
}
}
val buildParameters = the<BuildParametersExtension>()
val develocityServer = "https://ge.junit.org"
val useDevelocityInstance = !gradle.startParameter.isBuildScan
develocity {
if (useDevelocityInstance) {
// Publish to scans.gradle.com when `--scan` is used explicitly
server = develocityServer
}
buildScan {
uploadInBackground = !buildParameters.ci
publishing {
onlyIf { it.isAuthenticated }
}
obfuscation {
if (buildParameters.ci) {
username { "github" }
} else {
hostname { null }
ipAddresses { emptyList() }
}
}
if (buildParameters.junit.develocity.testDistribution.enabled) {
tag("test-distribution")
}
}
}
buildCache {
local {
isEnabled = !buildParameters.ci
}
val buildCacheServer = buildParameters.junit.develocity.buildCache.server
if (useDevelocityInstance) {
remote(develocity.buildCache) {
server = buildCacheServer.orNull
val authenticated = System.getenv("DEVELOCITY_ACCESS_KEY") != null
isPush = buildParameters.ci && authenticated
}
} else {
remote<HttpBuildCache> {
url = uri(buildCacheServer.getOrElse(develocityServer)).resolve("/cache/")
}
}
}
includeBuild("gradle/base")
rootProject.name = "junit5"
include("documentation")
include("junit-jupiter")
include("junit-jupiter-api")
include("junit-jupiter-engine")
include("junit-jupiter-migrationsupport")
include("junit-jupiter-params")
include("junit-platform-commons")
include("junit-platform-console")
include("junit-platform-console-standalone")
include("junit-platform-engine")
include("junit-platform-jfr")
include("junit-platform-launcher")
include("junit-platform-reporting")
include("junit-platform-runner")
include("junit-platform-suite")
include("junit-platform-suite-api")
include("junit-platform-suite-commons")
include("junit-platform-suite-engine")
include("junit-platform-testkit")
include("junit-vintage-engine")
include("jupiter-tests")
include("platform-tests")
include("platform-tooling-support-tests")
include("junit-bom")
// check that every subproject has a custom build file
// based on the project name
rootProject.children.forEach { project ->
project.buildFileName = "${project.name}.gradle.kts"
require(project.buildFile.isFile) {
"${project.buildFile} must exist"
}
}
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")