# 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](/bitrise-build-cache/build-cache-for-gradle/configuring-the-build-cache-for-gradle-in-local-builds), you need to first activate it in our CI environment.

You can also set this up with an AI coding agent instead of following the steps manually. See [Getting started with AI](/bitrise-build-cache/getting-started-with-the-build-cache/getting-started-with-ai).

  

**Workflow Editor**

  1. 1. Log in to Bitrise and select **Bitrise CI** on the left, then select your project.
1. Click the **Workflows** button on the main page.
  1. Add the [**Build Cache for Gradle**](https://github.com/bitrise-steplib/bitrise-step-activate-gradle-remote-cache) Step to your Workflow.

     The Step should be before any Step that executes Gradle tasks, such as [**Gradle Runner**](https://github.com/bitrise-io/steps-gradle-runner) or [**Android Build**](https://github.com/bitrise-steplib/bitrise-step-android-build).

     ![gradle-cache-image.png](/img/_paligo/uuid-1afefa9a-7cc1-db41-6186-0ee56293458c.png)

  
  

**Configuration YAML**

  1. 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`.

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