diff --git a/.github/workflows/actions_build.yml b/.github/workflows/actions_build.yml index 1ceb8e3b42a..ab09d7785f2 100644 --- a/.github/workflows/actions_build.yml +++ b/.github/workflows/actions_build.yml @@ -22,8 +22,6 @@ env: GH_TOKEN: ${{ github.token }} RUN_ID: ${{ github.run_id }} PR_NUMBER: ${{ github.event.pull_request.number }} - GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} - GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} jobs: build: diff --git a/.github/workflows/gradle-enterprise-postjob.yml b/.github/workflows/gradle-enterprise-postjob.yml index 4a91d28d1b9..f2da7af59cb 100644 --- a/.github/workflows/gradle-enterprise-postjob.yml +++ b/.github/workflows/gradle-enterprise-postjob.yml @@ -10,8 +10,6 @@ env: LC_ALL: "en_US.UTF-8" BUILD_JDK_VERSION: "19" 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 }} RUN_ID: ${{ github.event.workflow_run.id }} COMMIT_SHA: ${{ github.event.workflow_run.head_sha }} # Used by Octokit diff --git a/settings.gradle b/settings.gradle index 4a28ba2839b..969874b7b7a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,10 +13,11 @@ plugins { import com.gradle.scan.plugin.PublishedBuildScan +def isCi = System.getenv("CI") != null + gradleEnterprise { server = "https://ge.armeria.dev" buildScan { - def isCi = System.getenv("CI") != null publishIfAuthenticated() publishAlways() uploadInBackground = !isCi @@ -59,13 +60,8 @@ gradleEnterprise { } buildCache { - remote(HttpBuildCache) { - url = 'https://ge.armeria.dev/cache/armeria/' - credentials { creds -> - creds.username = System.getenv('GRADLE_ENTERPRISE_CACHE_USERNAME') - creds.password = System.getenv('GRADLE_ENTERPRISE_CACHE_PASSWORD') - } - push = System.getenv('CI') != null + remote(gradleEnterprise.buildCache) { + push = isCi } }