Skip to content
Gradle build cache

Reuse completed Gradle tasks in the next build.

Connect Gradle’s HTTP build cache to a shared workspace. Reuse cacheable task outputs from CI or a teammate’s compatible build.

.boringcache.toml
workspace = "my-org/app"

[adapters.gradle]
tag = "gradle-cache"
command = ["./gradlew", "build", "--build-cache"]
boringcache gradle
permissions:
  contents: read
  id-token: write

steps:
  - uses: boringcache/one@f0fb9b2d926a32b10c543e92093ba00c5a291b79 # v1.33.0
    with:
      mode: gradle
      trust-policy: auto
  - run: ./gradlew build --build-cache
steps:
  - label: Build
    command: >
      boringcache ci run
      --oidc-provider buildkite
      -- boringcache gradle
build:
  timeout: 1h
  id_tokens:
    BORINGCACHE_OIDC_TOKEN:
      aud: urn:boringcache:workload
  script:
    - boringcache ci run --oidc-provider gitlab -- boringcache gradle

How BoringCache fits your build.

Task outputs

Restore outputs when Gradle finds a matching cacheable task.

Existing task rules

Gradle keeps its cacheability decisions and input keys.

Across machines

Use one workspace in CI and local development.

Add shared storage to your Gradle workflow.

Keep your wrapper and build commands. Use the workspace to inspect reads, misses, transfers, and stored cache.

See how your Gradle cache is used.

Track cache reads, writes, transfers, and stored data across your builds.

Explore the workspace →
OpenTelemetry Java

Cache stored

BoringCache0.758 GiB
actions/cache3.511 GiB

78%

Less cache stored

OpenTelemetry Java · compared with actions/cache

Keep shared-cache publication in trusted jobs.

Give consumers restore access and publishers a separate permission. Connect supported CI through OIDC or use scoped credentials.

Connect your CI →

Separate readers and publishers

  • Trusted builds Publish shared cache for the next build Read + publish
  • Pull requests Restore cache without replacing it Read only
  • Local development Use a scoped credential for the workspace Scoped access

Before you connect.

Can we use BoringCache for Gradle remote caching?
Yes. BoringCache provides a shared endpoint for Gradle’s HTTP build cache. It does not replace Develocity’s broader feature set.
Can Gradle cache share the same workspace as Docker cache?
Yes. Gradle, Docker, directory caches, and other supported tools can share the same BoringCache workspace.
Read the Gradle setup guide →

Start with your next Gradle build.

Install the CLI. Run onboarding to connect your repository and configure your cache.

30 GB of cache free. No credit card required.

curl -sSL https://install.boringcache.com/install.sh | sh
boringcache onboard
boringcache gradle