@@ -13,7 +13,6 @@ pluginManagement {
1313}
1414
1515plugins {
16- id(" com.gradle.develocity" ) version " 3.18.2"
1716 id(" com.gradle.common-custom-user-data-gradle-plugin" ) version " 2.0.2"
1817 id(" org.gradle.toolchains.foojay-resolver-convention" ) version " 0.9.0"
1918 // this can't live in pluginManagement currently due to
@@ -22,6 +21,7 @@ plugins {
2221 // ./gradlew :smoke-tests:images:servlet:buildLinuxTestImages pushMatrix -PsmokeTestServer=jetty
2322 // ./gradlew :smoke-tests:images:servlet:buildWindowsTestImages pushMatrix -PsmokeTestServer=jetty
2423 id(" com.bmuschko.docker-remote-api" ) version " 9.4.0" apply false
24+ id(" com.gradle.develocity" ) version " 3.18.2"
2525}
2626
2727dependencyResolutionManagement {
@@ -48,64 +48,11 @@ dependencyResolutionManagement {
4848 }
4949}
5050
51- val gradleEnterpriseServer = " https://ge.opentelemetry.io"
52- val isCI = System .getenv(" CI" ) != null
53- val geAccessKey = System .getenv(" GRADLE_ENTERPRISE_ACCESS_KEY" ) ? : " "
54-
55- // if GE access key is not given and we are in CI, then we publish to scans.gradle.com
56- val useScansGradleCom = isCI && geAccessKey.isEmpty()
57-
58- if (useScansGradleCom) {
59- develocity {
60- buildScan {
61- termsOfUseUrl = " https://gradle.com/help/legal-terms-of-use"
62- termsOfUseAgree = " yes"
63- uploadInBackground = ! isCI
64-
65- capture {
66- fileFingerprints = true
67- }
68-
69- if (! gradle.startParameter.taskNames.contains(" listTestsInPartition" )) {
70- buildScanPublished {
71- File (" build-scan.txt" ).printWriter().use { writer ->
72- writer.println (buildScanUri)
73- }
74- }
75- }
76- }
77- }
78- } else {
79- develocity {
80- server = gradleEnterpriseServer
81- buildScan {
82- uploadInBackground = ! isCI
83- publishing.onlyIf { it.isAuthenticated }
84-
85- capture {
86- fileFingerprints = true
87- }
88-
89- gradle.startParameter.projectProperties[" testJavaVersion" ]?.let { tag(it) }
90- gradle.startParameter.projectProperties[" testJavaVM" ]?.let { tag(it) }
91- gradle.startParameter.projectProperties[" smokeTestSuite" ]?.let {
92- value(" Smoke test suite" , it)
93- }
94-
95- if (! gradle.startParameter.taskNames.contains(" listTestsInPartition" )) {
96- buildScanPublished {
97- File (" build-scan.txt" ).printWriter().use { writer ->
98- writer.println (buildScanUri)
99- }
100- }
101- }
102- }
103- }
104-
105- buildCache {
106- remote(develocity.buildCache) {
107- isPush = isCI && geAccessKey.isNotEmpty()
108- }
51+ develocity {
52+ buildScan {
53+ publishing.onlyIf { System .getenv(" CI" ) != null }
54+ termsOfUseUrl.set(" https://gradle.com/help/legal-terms-of-use" )
55+ termsOfUseAgree.set(" yes" )
10956 }
11057}
11158
0 commit comments