Skip to main content

Configuring the build cache for Gradle in the Bitrise CI environment

In the Bitrise CI environment, you only need our official Step to use the Bitrise Build Cache for your Gradle builds.

If you want to use the Bitrise Build Cache in your local builds, you need to first activate it in our CI environment.

Workflow Editor

bitrise.yml

  1. Log in to Bitrise and select Bitrise CI on the left, then select your project.

  2. Click the Workflows button on the main page.

  3. Add the Build Cache for Gradle Step to your Workflow.

    The Step should be before any Step that executes Gradle tasks, such as Gradle Runner or Android Build.

    gradle-cache-image.png

  4. Open the bitrise.yml file and add the activate-build-cache-for-gradle Step to your Workflow.

    The Step should be before any Step that executes Gradle tasks, such as gradle-runner or android-build.

    your-workflow:
    steps:
    - git-clone@8: {}
    - activate-build-cache-for-gradle: