Bitbucket pipelines reduce build time by caching gradle

Patrick Farwick April 21, 2017

 

image: java:8

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - bash ./gradlew --version
          - bash ./gradlew build

Hi,

I' wondering how I can reduce the build time for a gradle based project.

On my PC Gradle finished the build in 5 seconds while it currently takes on bitbucket pipelines 2 minutes because Gradle has to do a complete setup each time it builds instead of caching the required data.

1 answer

1 vote
davina
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 2017

Hi,

We support dependency caching.

You can add

caches:
- gradle

to the step in your bitbucket-pipelines.yml.

See our documentation.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events