我想緩存一個私人的Travis CI存儲庫的依賴關係,Travis有一些特定於Gradle的機制,還是我必須緩存特定的目錄?緩存gradle的依賴關係,特拉維斯CI
.travis.yml:
language: groovy
jdk:
- openjdk7
env:
- TERM=dumb
before_install:
- cd application
- chmod +x gradlew
script:
- ./gradlew build
最後一個工作日構建的相關部分:
Downloading https://services.gradle.org/distributions/gradle-2.1-bin.zip
......................................................................................................................................................................................
Unzipping /home/travis/.gradle/wrapper/dists/gradle-2.1-bin/2pk0g2l49n2sbne636fhtlet6a/gradle-2.1-bin.zip to /home/travis/.gradle/wrapper/dists/gradle-2.1-bin/2pk0g2l49n2sbne636fhtlet6a
Set executable permissions for: /home/travis/.gradle/wrapper/dists/gradle-2.1-bin/2pk0g2l49n2sbne636fhtlet6a/gradle-2.1/bin/gradle
Download https://jcenter.bintray.com/com/mycila/xmltool/xmltool/3.3/xmltool-3.3.pom
...
會增加:
cache:
directories:
- $HOME/.gradle
工作?或者是:
cache:
directories:
- $HOME/.gradle/caches/modules-2/files-2.1
https://docs.travis-ci.com/user/languages/java/#Projects-Using-Gradle – gliptak 2015-12-16 00:14:43