Skip to content

Commit 9c6b6c4

Browse files
committed
Add develocity to settings.gradle.kts in gradle-settings-conventions
1 parent 5fb77a1 commit 9c6b6c4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

gradle-conventions-settings/settings.gradle.kts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,36 @@
22
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5+
plugins {
6+
// Keep it in sync with libs.versions.toml
7+
id("com.gradle.develocity") version "3.19.2"
8+
}
9+
510
rootProject.name = "gradle-conventions-settings"
611

712
// Code below is a hack because a chicken-egg problem, I can't use myself as a settings-plugin
813
apply(from = "src/main/kotlin/conventions-repositories.settings.gradle.kts")
914
apply(from = "src/main/kotlin/conventions-version-resolution.settings.gradle.kts")
1015

1116
include(":develocity")
17+
18+
// Should be in sync with ktorbuild.develocity.settings.gradle.kts
19+
develocity {
20+
server = "https://ge.jetbrains.com"
21+
}
22+
23+
val isCIRun = providers.environmentVariable("TEAMCITY_VERSION").isPresent ||
24+
providers.environmentVariable("GITHUB_ACTIONS").isPresent
25+
26+
buildCache {
27+
if (isCIRun) {
28+
local {
29+
isEnabled = false
30+
}
31+
}
32+
33+
remote(develocity.buildCache) {
34+
isPush = isCIRun
35+
isEnabled = true
36+
}
37+
}

0 commit comments

Comments
 (0)