-
Notifications
You must be signed in to change notification settings - Fork 6
/
settings.gradle.kts
50 lines (41 loc) · 1.29 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
pluginManagement {
plugins {
id("com.gradle.develocity") version "3.19"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
}
plugins {
id("com.gradle.develocity")
id("com.gradle.common-custom-user-data-gradle-plugin")
}
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}
val isCI = providers.environmentVariable("CI").presence()
develocity {
server = "https://ge.gradle.org"
buildScan {
uploadInBackground = isCI.not()
publishing.onlyIf { it.isAuthenticated }
obfuscation {
ipAddresses { addresses -> addresses.map { "0.0.0.0" } }
}
}
}
buildCache {
local {
isEnabled = true
}
remote(develocity.buildCache) {
server = "https://eu-build-cache.gradle.org"
isEnabled = true
val hasAccessKey = providers.environmentVariable("DEVELOCITY_ACCESS_KEY").map { it.isNotBlank() }.orElse(false)
isPush = hasAccessKey.zip(isCI) { accessKey, ci -> ci && accessKey }.get()
}
}
rootProject.name = "develocity-testing-annotations"
fun Provider<*>.presence(): Provider<Boolean> = map { true }.orElse(false)
fun Provider<Boolean>.not(): Provider<Boolean> = map { !it }