DS Gradle Cloud Cache Feb 9th, 2020

Installation

The plugin can be found in the Gradle Plugin repository.

The plugin will seamlessly integrate into the Gradle cache infrastructure so the only thing that is needed is applying the plugin to your project.

Adding the plugin to the project

To add the plugin to the project create a file called settings.gradle in the root folder of your project and add the following:

settings.gradle

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  // 1. Add the plugin
  plugins {
      id "com.devsoap.cache" version "1.0.2"
  }

  // 2. Assign your license details
  devsoap {
      email = '...'
      key = '...'
  }

  // Optional: Disable local build cache
   buildCache {
     local {
         enabled = false
     }
  }

First, the plugin is applied to the project via the standard plugins block, just like you normally add any plugin. The only difference is that we are adding the plugin in settings.gradle and not in build.gradle. This is because caching needs to be available before the actual build starts.

In the seconds step wee need to add our credentials to validate the plugin. This should be a familiar step if you already are used to other Devsoap products.

This is all that is needed to enable the plugin in your Gradle project.