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() } }