Rework build scan configuration (#4763)
This commit is contained in:
parent
b6aaa35813
commit
08e92a5374
|
@ -33,23 +33,32 @@ 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
|
// if GE access key is not given and we are in CI, then we publish to scans.gradle.com
|
||||||
val useScansGradleCom = isCI && geAccessKey.isEmpty()
|
val useScansGradleCom = isCI && geAccessKey.isEmpty()
|
||||||
|
|
||||||
gradleEnterprise {
|
if (useScansGradleCom) {
|
||||||
if (!useScansGradleCom) {
|
gradleEnterprise {
|
||||||
server = gradleEnterpriseServer
|
buildScan {
|
||||||
}
|
|
||||||
buildScan {
|
|
||||||
if (useScansGradleCom) {
|
|
||||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||||
termsOfServiceAgree = "yes"
|
termsOfServiceAgree = "yes"
|
||||||
|
isUploadInBackground = !isCI
|
||||||
|
publishAlways()
|
||||||
|
|
||||||
|
capture {
|
||||||
|
isTaskInputFiles = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
publishAlways()
|
}
|
||||||
this as com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
|
} else {
|
||||||
publishIfAuthenticated()
|
gradleEnterprise {
|
||||||
|
server = gradleEnterpriseServer
|
||||||
|
buildScan {
|
||||||
|
isUploadInBackground = !isCI
|
||||||
|
|
||||||
isUploadInBackground = !isCI
|
this as com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
|
||||||
|
publishIfAuthenticated()
|
||||||
|
publishAlways()
|
||||||
|
|
||||||
capture {
|
capture {
|
||||||
isTaskInputFiles = true
|
isTaskInputFiles = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue