Skip to content

Enable Cloud Storage Prefix for Remote Build Cache #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

smrtfl
Copy link

@smrtfl smrtfl commented May 16, 2025

Introduce support for specifying a custom prefix path when storing Gradle build cache entries in remote storage, such as GCS and AWS S3. By allowing a configurable prefix, users can better organize and isolate cache artifacts within a shared storage entity, facilitating multi-project setups and improving cache management.

Features

  • Configurable Prefix: Adds a new option to define a prefix path under which all cache entries will be stored in the remote storage.
  • Backward Compatibility: If no prefix is specified, the plugin retains its existing behavior, ensuring seamless integration with current configurations.

Example Usage

import androidx.build.gradle.s3buildcache.S3BuildCache
import androidx.build.gradle.s3buildcache.ExportedS3Credentials

plugins {
    id("androidx.build.gradle.s3buildcache")
}
            
buildCache {
    remote(S3BuildCache::class) {
        region = "foo"
        bucketName = "bar"
        prefix = "baz"
        credentials = ExportedS3Credentials("key-id", "secret-key")
    }
}

Copy link

google-cla bot commented May 16, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@smrtfl smrtfl changed the title Enable cloud storage prefix Enable Cloud Storage Prefix for Remote Build Cache May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant