From 835f4edcbfcba4991321a24429d852c862329bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Kojek?= Date: Thu, 14 Dec 2023 15:53:04 +0100 Subject: [PATCH] Update gradle enterprise setup (#251) * Bumped Gradle enterprise to 3.16 and CCUD plugins to 1.12.1 * Set remote build cache to push only if authenticated * Added Revved up by Develocity badge --- README.md | 1 + settings.gradle.kts | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 55f0c97a8..cab6475d9 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![ci](https://github.com/openrewrite/rewrite-gradle-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/openrewrite/rewrite-gradle-plugin/actions/workflows/ci.yml) [![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/org.openrewrite/plugin/maven-metadata.xml.svg?label=gradlePluginPortal)](https://plugins.gradle.org/plugin/org.openrewrite.rewrite) [![Apache 2.0](https://img.shields.io/github/license/openrewrite/rewrite-gradle-plugin.svg)](https://www.apache.org/licenses/LICENSE-2.0) +[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.openrewrite.org/scans) [![Contributing Guide](https://img.shields.io/badge/Contributing-Guide-informational)](https://github.com/openrewrite/.github/blob/main/CONTRIBUTING.md) ## What is this? diff --git a/settings.gradle.kts b/settings.gradle.kts index 758ffb2be..274651f12 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -4,8 +4,8 @@ include("plugin") include("metrics") plugins { - id("com.gradle.enterprise") version "3.12.3" - id("com.gradle.common-custom-user-data-gradle-plugin") version "1.8.2" + id("com.gradle.enterprise") version "3.16" + id("com.gradle.common-custom-user-data-gradle-plugin") version "1.12.1" } gradleEnterprise { @@ -15,7 +15,9 @@ gradleEnterprise { buildCache { remote(HttpBuildCache::class) { url = uri("https://ge.openrewrite.org/cache/") - isPush = isCiServer + // 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() } }