From 356e30f446688eca637c999e1b592fc06f9fe53a Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Sat, 3 Aug 2019 21:46:02 +0200 Subject: [PATCH] Cache Gradle dependencies on Travis CI --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index f32ea7d..9f6458c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,3 +21,13 @@ deploy: tag_name: $TRAVIS_TAG name: $TRAVIS_COMMIT_MESSAGE draft: true + +# Enable caching of dependencies. +# See https://guides.gradle.org/executing-gradle-builds-on-travisci/#enable_caching_of_downloaded_artifacts +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ +cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ \ No newline at end of file