-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
38 lines (31 loc) · 1.09 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
plugins {
id("com.gradle.develocity") version "3.18.1"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2"
}
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-agent-adapters"
include("develocity-gradle-plugin-adapters")
include("develocity-maven-extension-adapters")
fun Provider<*>.presence(): Provider<Boolean> = map { true }.orElse(false)
fun Provider<Boolean>.not(): Provider<Boolean> = map { !it }