From V3.5, Gradle introduces a build cache feature that lets you reuse outputs produced by other builds, instead of rebuilding them, and dramatically reduce build time. This feature supports not only your local filesystem cache, but also remote caches that can be shared across your organization.
The Gradle team has measured an average reduction of 25% in total build time, and even a reduction of 80% with some of their commits!
To optimize your Gradle builds:
Configure Artifactory to be your Gradle build cache
Configure Gradle to use the build cache in Artifactory