Reputation:
I add cache property inside my gitlab-ci.yml
file in my Android project.
cache:
paths:
- .gradle/wrapper
- .gradle/caches
But in each pipeline when I run ./gradlew assemble
, It downloads all gradle dependencies which cause slow build time.
Upvotes: 18
Views: 11518
Reputation: 1990
I'm doing it like this
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
cache:
paths:
- .gradle/wrapper
- .gradle/caches
Upvotes: 31