File tree Expand file tree Collapse file tree 1 file changed +12
-18
lines changed
Expand file tree Collapse file tree 1 file changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -29,24 +29,19 @@ val develocityServer = "https://develocity.opentelemetry.io"
2929val isCI = System .getenv(" CI" ) != null
3030val develocityAccessKey = System .getenv(" DEVELOCITY_ACCESS_KEY" ) ? : " "
3131
32- // if develocity access key is not given and we are in CI, then we publish to scans.gradle.com
33- val useScansGradleCom = isCI && develocityAccessKey.isEmpty()
34-
3532develocity {
36- if (useScansGradleCom) {
37- buildScan {
38- termsOfUseUrl = " https://gradle.com/help/legal-terms-of-use"
39- termsOfUseAgree = " yes"
40- }
41- } else {
33+ if (develocityAccessKey.isNotEmpty()) {
4234 server = develocityServer
43- buildScan {
44- publishing.onlyIf { it.isAuthenticated }
45- }
4635 }
4736
4837 buildScan {
49- uploadInBackground = ! isCI
38+ if (develocityAccessKey.isNotEmpty()) {
39+ } else if (isCI) {
40+ termsOfUseUrl = " https://gradle.com/help/legal-terms-of-use"
41+ termsOfUseAgree = " yes"
42+ } else {
43+ publishing.onlyIf { false }
44+ }
5045
5146 capture {
5247 fileFingerprints = true
@@ -60,11 +55,10 @@ develocity {
6055 }
6156}
6257
63- if (! useScansGradleCom) {
64- buildCache {
65- remote(develocity.buildCache) {
66- isPush = isCI && develocityAccessKey.isNotEmpty()
67- }
58+ buildCache {
59+ remote(HttpBuildCache ::class ) {
60+ url = uri(" $develocityServer /cache/" )
61+ isPush = isCI && develocityAccessKey.isNotEmpty()
6862 }
6963}
7064
You can’t perform that action at this time.
0 commit comments