Skip to content

Commit e27058e

Browse files
committed
Stop publishing to scans.gradle.com for PR builds
1 parent d455b98 commit e27058e

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

settings.gradle.kts

+4-11
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,18 @@ val junitBuildCachePassword: String? by extra
3535

3636
gradleEnterprise {
3737
buildScan {
38-
isCaptureTaskInputFiles = true
38+
capture.isTaskInputFiles = true
3939
isUploadInBackground = !isCiServer
4040

41-
fun accessKeysAreMissingOrBlank() = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY").isNullOrBlank()
41+
publishAlways()
4242

43-
if (gradle.startParameter.isBuildScan || (isCiServer && accessKeysAreMissingOrBlank())) {
44-
termsOfServiceUrl = "https://gradle.com/terms-of-service"
45-
} else {
43+
// Publish to scans.gradle.com when `--scan` is used explicitly
44+
if (!gradle.startParameter.isBuildScan) {
4645
server = gradleEnterpriseServer
47-
publishAlways()
4846
this as BuildScanExtensionWithHiddenFeatures
4947
publishIfAuthenticated()
5048
}
5149

52-
if (isCiServer) {
53-
publishAlways()
54-
termsOfServiceAgree = "yes"
55-
}
56-
5750
obfuscation {
5851
if (isCiServer) {
5952
username { "github" }

0 commit comments

Comments
 (0)