GCSCache

A custom Gradle build cache implementation which uses Google Cloud Storage to store the cache objects

MIT License

Stars
0

GCSCache

A custom Gradle Build Cache implementation which uses Google Cloud Storage to store the cacheable artifacts.

Description

Haven't heard about Gradle's Build Cache yet?

In a nutshell the generated output of a Task will cached (either local or remote) and can be reused the next time you build your software. Event on clean builds.

The GCSCache will exactly do that for you. It will store the generated artifacts in your Google Cloud Storage which can be reused the next time you do a build.

How to use it

Apply the plugin

To apply the plugin just put the following to the top of your settings.gradle:

buildscript {
  repositories {
    maven { url "https://plugins.gradle.org/m2/" } // TODO: Check if gradlePluginPortal() is possible
    // or
    jcenter()
  }
  dependencies {
    classpath "" // TODO: Define classpath
  }
}

Configuration

Just go to your settings.gradle and use the following code:

apply plugin: guru.stefma.gcs.cache.GCSCachePlugin // TODO: Use plugin in

buildCache {
    remote(guru.stefma.gcs.cache.GCSBuildCache) {
        push = true 
    }
}

This will enable the GCSCache and enable the push (so that it will upload the artifacts as well).

Other configuration options are:

Property Description Mandatory Default Value
enabled If the remote Build Cache is enabled true
push If artifacts should be pushed/uploaded to the cloud false

Authentication

Since the plugin needs to authenticate you with your Google Cloud you have to follow these steps to authenticate.

Badges
Extracted from project README
CircleCI License