Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.51 KB

android-key-cache.md

File metadata and controls

32 lines (22 loc) · 1.51 KB

(Android) Cache Gradle dependencies (Beta)

Description

Cache project dependencies that Gradle downloads with the new key-based caching Steps, Save Gradle Cache and Restore Gradle Cache.

If you want to cache not only the dependencies but build tasks as well, check out this workflow recipe.

Instructions

  1. Add the Restore Gradle Cache Step to the Workflow.
  2. Add the usual Android Steps, such as Android Build.
  3. Add the Save Gradle Cache Step.
  4. If you want to cache not only the dependencies but build tasks as well, check out this workflow recipe.

Fine tune cache behaviour

The Gradle specific cache steps use optimal cache key and path configurations maintained by Bitrise. If you want full control over what should be cached then please check out the generic Restore Cache and Save Cache Steps.

You can always check out what key and path settings the Gradle cache step uses: Github code snippet

bitrise.yml

- restore-gradle-cache@2: {}
- android-build@1:
    inputs:
    - variant: debug
    - build_type: apk
- save-gradle-cache@1: {}