See https://circleci.com/docs/2.0/caching/#gradle-java
This should give us better cache hits on cached dependency jars, which are generally different per branch, while the root build.gradle file will be the same.
Using the build.gradle file is probably not the best choice for the cache key still. Probably we would want to use all the build.gradle files and all of the lockfiles combined.