Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Commit d38c9b8

Browse files
committed
Add Gradle Enterprise
1 parent 19e1206 commit d38c9b8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

settings.gradle.kts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,34 @@ pluginManagement {
66
}
77

88
rootProject.name = "rewrite-kotlin"
9+
10+
plugins {
11+
id("com.gradle.enterprise") version "latest.release"
12+
id("com.gradle.common-custom-user-data-gradle-plugin") version "latest.release"
13+
}
14+
15+
gradleEnterprise {
16+
val isCiServer = System.getenv("CI")?.equals("true") ?: false
17+
server = "https://ge.openrewrite.org/"
18+
19+
buildCache {
20+
remote(HttpBuildCache::class) {
21+
url = uri("https://ge.openrewrite.org/cache/")
22+
// Check access key presence to avoid build cache errors on PR builds when access key is not present
23+
val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
24+
isPush = isCiServer && !accessKey.isNullOrEmpty()
25+
}
26+
}
27+
28+
buildScan {
29+
capture {
30+
isTaskInputFiles = true
31+
}
32+
33+
isUploadInBackground = !isCiServer
34+
35+
publishAlways()
36+
this as com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
37+
publishIfAuthenticated()
38+
}
39+
}

0 commit comments

Comments
 (0)