forked from open-telemetry/opentelemetry-proto-java
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
53 lines (45 loc) · 1.28 KB
/
settings.gradle.kts
File metadata and controls
53 lines (45 loc) · 1.28 KB
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
pluginManagement {
plugins {
id("com.google.protobuf") version "0.10.0"
id("de.undercouch.download") version "5.7.0"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
id("com.gradle.develocity") version "4.4.1"
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention")
id("com.gradle.develocity")
}
val develocityServer = "https://develocity.opentelemetry.io"
val isCI = System.getenv("CI") != null
val develocityAccessKey = System.getenv("DEVELOCITY_ACCESS_KEY") ?: ""
// if develocity access key is not given and we are in CI, then we publish to scans.gradle.com
val useScansGradleCom = isCI && develocityAccessKey.isEmpty()
develocity {
if (useScansGradleCom) {
buildScan {
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = "yes"
}
} else {
server = develocityServer
buildScan {
publishing.onlyIf { it.isAuthenticated }
}
}
buildScan {
uploadInBackground = !isCI
capture {
fileFingerprints = true
}
}
}
if (!useScansGradleCom) {
buildCache {
remote(develocity.buildCache) {
isPush = isCI && develocityAccessKey.isNotEmpty()
}
}
}
rootProject.name = "opentelemetry-proto"