@@ -53,26 +53,23 @@ val isCI = System.getenv("CI") != null
5353val develocityAccessKey = System .getenv(" DEVELOCITY_ACCESS_KEY" ) ? : " "
5454
5555develocity {
56- if (develocityAccessKey.isEmpty()) {
57- buildScan {
58- termsOfUseUrl = " https://gradle.com/help/legal-terms-of-use"
59- termsOfUseAgree = " yes"
60- }
61- } else {
56+ if (develocityAccessKey.isNotEmpty()) {
6257 server = develocityServer
63- buildScan {
64- publishing.onlyIf { it.isAuthenticated }
58+ }
6559
60+ buildScan {
61+ if (develocityAccessKey.isNotEmpty()) {
6662 gradle.startParameter.projectProperties[" testJavaVersion" ]?.let { tag(it) }
6763 gradle.startParameter.projectProperties[" testJavaVM" ]?.let { tag(it) }
6864 gradle.startParameter.projectProperties[" smokeTestSuite" ]?.let {
6965 value(" Smoke test suite" , it)
7066 }
67+ } else if (isCI) {
68+ termsOfUseUrl = " https://gradle.com/help/legal-terms-of-use"
69+ termsOfUseAgree = " yes"
70+ } else {
71+ publishing.onlyIf { false }
7172 }
72- }
73-
74- buildScan {
75- uploadInBackground = ! isCI
7673
7774 capture {
7875 fileFingerprints = true
@@ -90,11 +87,10 @@ develocity {
9087 }
9188}
9289
93- if (develocityAccessKey.isNotEmpty()) {
94- buildCache {
95- remote(develocity.buildCache) {
96- isPush = isCI && develocityAccessKey.isNotEmpty()
97- }
90+ buildCache {
91+ remote(HttpBuildCache ::class ) {
92+ url = uri(" $develocityServer /cache/" )
93+ isPush = isCI && develocityAccessKey.isNotEmpty()
9894 }
9995}
10096
0 commit comments