Skip to content

Commit

Permalink
Merge pull request #110 from depot/docs-sync-updates
Browse files Browse the repository at this point in the history
Update content from depot/app
  • Loading branch information
lukevmorris authored Jan 14, 2025
2 parents 9c3d07e + bc11279 commit b2c49f0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions content/cache/reference/gradle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If this automatic configuration is incompatible with your specific setup, you ca

### From your local machine or any CI/CD system

To manually configure Gradle to use Depot Cache, you will need to configure remote caching in your `settings.gradle` file. Configure Gradle to use the Depot Cache service endpoints and set your API token in the `Authorization` header:
To manually configure Gradle to use Depot Cache, you will need to configure remote caching in your `settings.gradle` file. Configure Gradle to use the Depot Cache service endpoints and set your API token as the `password` credential:

`settings.gradle`:

Expand All @@ -34,22 +34,25 @@ buildCache {
url = 'https://cache.depot.dev'
enabled = true
push = true
headers {
header 'Authorization', 'DEPOT_TOKEN'
credentials {
username = ''
password = 'DEPOT_TOKEN'
}
}
}
```

If you are a member of multiple organizations, and you are authenticating with a user token, you must additionally specify which organization to use for cache storage with the `x-depot-org` header:
If you are a member of multiple organizations, and you are authenticating with a user token, you must additionally specify which organization ID to use for cache storage in the username:

```groovy
buildCache {
remote(HttpBuildCache) {
...
headers {
header 'Authorization', 'DEPOT_TOKEN'
header 'x-depot-org', 'DEPOT_ORG_ID'
url = 'https://cache.depot.dev'
enabled = true
push = true
credentials {
username = 'DEPOT_ORG_ID'
password = 'DEPOT_TOKEN'
}
}
}
Expand Down

0 comments on commit b2c49f0

Please sign in to comment.