forked from open-telemetry/semantic-conventions-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
63 lines (53 loc) · 1.53 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
pluginManagement {
plugins {
id("com.gradle.enterprise") version "3.14.1"
id("de.undercouch.download") version "5.4.0"
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
}
}
plugins {
id("com.gradle.enterprise")
}
dependencyResolutionManagement {
repositories {
mavenCentral()
mavenLocal()
}
}
rootProject.name = "semantic-conventions-java"
include(":dependencyManagement")
include(":semconv-incubating")
include(":semconv")
val gradleEnterpriseServer = "https://ge.opentelemetry.io"
val isCI = System.getenv("CI") != null
val geAccessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY") ?: ""
// if GE access key is not given and we are in CI, then we publish to scans.gradle.com
val useScansGradleCom = isCI && geAccessKey.isEmpty()
if (useScansGradleCom) {
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
isUploadInBackground = !isCI
publishAlways()
capture {
isTaskInputFiles = true
}
}
}
} else {
gradleEnterprise {
server = gradleEnterpriseServer
buildScan {
isUploadInBackground = !isCI
this as com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
publishIfAuthenticated()
publishAlways()
capture {
isTaskInputFiles = true
}
gradle.startParameter.projectProperties["testJavaVersion"]?.let { tag(it) }
gradle.startParameter.projectProperties["testJavaVM"]?.let { tag(it) }
}
}
}