Gradle 3.5 introduced the build cache. With the build cache we can share task output between builds on different computers. For example the build output from a continuous integration server can be used on a developer's computer. To use the build cache feature we use the command-line option
. Instead of using the command-line option
we can set the Gradle property
with the value
in the file
of our project. To set this property for all our projects we set the property in the
file in the Gradle home directory, which is usually at
In the following example we set the property
# File: ~/.gradle/gradle.properties org.gradle.caching=true
If we want to disable the build cache feature set via the global property we can use the command-line option
to disable the build cache for a particular build.
Written with Gradle 3.5.