diff --git a/.gitignore b/.gitignore index 03ed5d58..d577f07a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build/ .idea/ .boot-releases out/ +.attach_pid* diff --git a/settings.gradle.kts b/settings.gradle.kts index 89feb669..7cbae9d3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -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() + } +}