Skip to content

Commit 0d3f519

Browse files
committed
Prefer a provider to access the CI environment variable
1 parent 9dbb6bb commit 0d3f519

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

settings.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ if (System.env['CI'] != null) {
6060
}
6161

6262
gradleEnterprise {
63-
if (System.env['CI'] != null) {
64-
buildScan {
65-
termsOfServiceUrl = "https://gradle.com/terms-of-service"
66-
termsOfServiceAgree = "yes"
67-
publishAlways()
68-
}
63+
buildScan {
64+
termsOfServiceUrl = "https://gradle.com/terms-of-service"
65+
termsOfServiceAgree = "yes"
66+
publishAlways(providers.environmentVariable('CI').present)
6967
}
7068
}
7169

0 commit comments

Comments
 (0)