Skip to content

Commit

Permalink
Stop publishing to scans.gradle.com for PR builds
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Nov 3, 2021
1 parent d455b98 commit e27058e
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,18 @@ val junitBuildCachePassword: String? by extra

gradleEnterprise {
buildScan {
isCaptureTaskInputFiles = true
capture.isTaskInputFiles = true
isUploadInBackground = !isCiServer

fun accessKeysAreMissingOrBlank() = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY").isNullOrBlank()
publishAlways()

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

if (isCiServer) {
publishAlways()
termsOfServiceAgree = "yes"
}

obfuscation {
if (isCiServer) {
username { "github" }
Expand Down

0 comments on commit e27058e

Please sign in to comment.