Gradle already does a great job when it comes to caching build outputs and building incrementally. We want to push this two steps further. Currently build outputs are cached locally per build, so the first step for us is to have a single cache for the build outputs for all builds on a machine, similar to how we cache external dependencies. This will mean that outputs can be reused across different builds, which will be particularly helpful on CI machines. As a next step this cache will become distributed, allowing any build output to be shared across machines. For large enterprise builds this will mean further significant performance improvements. Cached outputs will include not only traditional task outputs, but also the outputs of the new configuration tasks.
The base concept for such a cache is that every task is a deterministic function from input to output, with the input including all relevant parameters. In the case of compilation for example, the input is not only the source code but also the version and the type of compiler, and the OS being used. When all of those parameters are captured, the cache output can be reliably shared across machines. Having a single task cache is something we plan to commence this year, continuing work into 2015. The internal Google Blaze build system introduced the concept of such a cache years ago. We are glad that Gradle will be able to offer it’s own version of this very powerful concept.