A Gradle remote build cache, with no server to run

Point Gradle's built-in HttpBuildCache at a CloudRepo repository. CI uploads task outputs, and any machine with a token can restore those tasks from the cache instead of running them again.

Every feature on every plan, from $99/month billed annually.

14 days free. No credit card required.

Serving developers since 2016 Founder-run, no venture capital

settings.gradle.kts
buildCache {
    remote<HttpBuildCache> {
        url = uri("https://[org-id].mycloudrepo.io/repositories/[repo-name]/")
        isPush = System.getenv("CI") != null
        credentials {
            username = System.getenv("CLOUDREPO_USERNAME")
            password = System.getenv("CLOUDREPO_TOKEN")
        }
    }
}

What you get

  • Gradle's own client HttpBuildCache is built into Gradle. There is no plugin to add and no cache server to run: the repository stores each entry and returns it byte for byte.
  • Uploads from CI only push is on only where CI is set. Developer machines read with a Download packages token and never write to the cache.
  • A credential you can scope A repository token reaches only the repositories you choose, can be read only, and can be revoked on its own, without changing anyone’s password.
  • Groovy or Kotlin DSL The docs show the same block for settings.gradle and settings.gradle.kts. Both were tested with Gradle 9.7.1.

Set it up

The full guide, with the Groovy block, is in the documentation.

Add the cache to settings.gradle.kts

Gradle uploads only where the CI environment variable is set, so developer builds read from the cache and upload nothing. Turn the cache on with org.gradle.caching=true in gradle.properties, or pass --build-cache.

settings.gradle.kts
buildCache {
    remote<HttpBuildCache> {
        url = uri("https://[org-id].mycloudrepo.io/repositories/[repo-name]/")
        isPush = System.getenv("CI") != null
        credentials {
            username = System.getenv("CLOUDREPO_USERNAME")
            password = System.getenv("CLOUDREPO_TOKEN")
        }
    }
}

Every step, in the docs

The full guide, and how to make the two tokens.

Put your Gradle build cache on CloudRepo

Create the cache repository, two tokens and one settings block.

Starting at $99/month billed annually.

Chris Shellenbarger, founder of CloudRepo

Founder-run since 2016, with no venture capital. A real person answers within one business day. Usually it's me.

Chris, founder of CloudRepo