Similar to what you just added for Node.js (https://changelog.travis-ci.com/for-node-js-builds-cache-npm-shortcut-is-available-77295), please also add “shortcut” for caching in Android/Java/Gradle builds.
What should be cached?
See this thread on SO:
It seems that the best solution is (not the accepted answer but a newer one) this:
One issue here: one of the paths to cache changes with every gradle version. In the post it’s quoted as:
But in the linked GitHub source file it appears as: