JakeWharton / SdkSearch

An Android app and Chrome extension for searching the Android SDK documentation.
Apache License 2.0
2.06k stars 175 forks source link

CI caching question? #178

Closed ursusursus closed 4 years ago

ursusursus commented 4 years ago

Hi, I'm trying to setup my CI, and was wondering on some of the config you have

cache_key: &cache_key
  key: jars-{{ checksum "build.gradle" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}

so I take it the cache key is a checksum of those 2 files. 1) Why not all *.gradle build files? Doesnt gradle cache more stuff other than dependencies?

2) Does this mean if I change 1 version in build.gradle where you have the map of versions, are all other dependencies thrown away as well?

3) why is gradle wrapper part of the key? Shouldn't it be independant of dependencies? No need to redownload gradle if some library changes. Or am I missing something?

Thanks

JakeWharton commented 4 years ago
  1. Changing the dependency structure does not affect the external dependencies which are cached
  2. Yep
  3. The Gradle distribution is cached and it is very large. Changing the Gradle version should invalidate the cache so we don't retain multiple copies