From f78a6afbe9027f44c2eb1038789c7daa69b89d2a Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Thu, 29 Feb 2024 12:22:20 +0100 Subject: [PATCH] refactor: Upgrade Develocity (#15) * refactor: Upgrade Develocity Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/Zb7BQc324?organizationId=NTUyM2Y5NWYtN2RjMC00Y2FiLWJmMmYtMmY2MmMzNjU1OWQz Co-authored-by: Moderne * Adopt access key --------- Co-authored-by: Moderne --- .github/workflows/ci.yml | 2 -- settings.gradle.kts | 15 ++++----------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5968dfa..e577f4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,6 @@ jobs: uses: openrewrite/gh-automation/.github/workflows/ci-gradle.yml@main secrets: gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - gradle_enterprise_cache_username: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} - gradle_enterprise_cache_password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} ossrh_username: ${{ secrets.OSSRH_USERNAME }} ossrh_token: ${{ secrets.OSSRH_TOKEN }} ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }} diff --git a/settings.gradle.kts b/settings.gradle.kts index 2db57fa..b7bc2b3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,19 +8,12 @@ plugins { gradleEnterprise { val isCiServer = System.getenv("CI")?.equals("true") ?: false server = "https://ge.openrewrite.org/" - val gradleCacheRemoteUsername: String? = System.getenv("GRADLE_ENTERPRISE_CACHE_USERNAME") - val gradleCacheRemotePassword: String? = System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD") buildCache { - remote(HttpBuildCache::class) { - url = uri("https://ge.openrewrite.org/cache/") - isPush = isCiServer - if (!gradleCacheRemoteUsername.isNullOrBlank() && !gradleCacheRemotePassword.isNullOrBlank()) { - credentials { - username = gradleCacheRemoteUsername - password = gradleCacheRemotePassword - } - } + remote(gradleEnterprise.buildCache) { + isEnabled = true + val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY") + isPush = isCiServer && !accessKey.isNullOrBlank() } }