Skip to content

Commit b180586

Browse files
committed
better
1 parent 4de1ae8 commit b180586

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,4 @@ replay_pid*
6161
.telemetry*
6262
.lycheecache
6363

64-
!java-agent/benchmark/releases/*.jar
65-
64+
build-scan.txt

settings.gradle.kts

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,23 @@ val isCI = System.getenv("CI") != null
5353
val develocityAccessKey = System.getenv("DEVELOCITY_ACCESS_KEY") ?: ""
5454

5555
develocity {
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

Comments
 (0)