Skip to content

Commit

Permalink
Add Develocity (formerly Gradle Enterprise) (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek authored Dec 16, 2023
1 parent 717157a commit 80cdb8c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build/
.idea/
.boot-releases
out/
.attach_pid*
34 changes: 34 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
rootProject.name = "rewrite-templating"

include("plugin")
include("metrics")

plugins {
id("com.gradle.enterprise") version "3.16"
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.12.1"
}

gradleEnterprise {
val isCiServer = System.getenv("CI")?.equals("true") ?: false
server = "https://ge.openrewrite.org/"

buildCache {
remote(HttpBuildCache::class) {
url = uri("https://ge.openrewrite.org/cache/")
// Check access key presence to avoid build cache errors on PR builds when access key is not present
val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
isPush = isCiServer && !accessKey.isNullOrEmpty()
}
}

buildScan {
capture {
isTaskInputFiles = true
}

isUploadInBackground = !isCiServer

publishAlways()
this as com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
publishIfAuthenticated()
}
}

0 comments on commit 80cdb8c

Please sign in to comment.