I think this may be useful for you - Appendix D. Gradle Command Line
--project-cache-dir
Specifies the cache directory for a specific project. Default value: .gradle in the project root directory.
--gradle-user-home
Specifies the home directory of the Gradle user. The default value is .gradle directory in the user's home directory
Excerpt from it in action - just tested locally:
C:\dev\ws\NYSSIS-Intellij\ear>gradle --gradle-user-home c:\dev\cache-test build Build initialized to use p12_2014_03_31e-windows-models.jar for ChoiceMaker model :compileJava UP-TO-DATE :compileGroovy UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :web:compileJava UP-TO-DATE :web:compileGroovy Download https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.4.6/groovy-all-2.4.6.pom Download https://repo1.maven.org/maven2/org/springframework/spring-webmvc/3.2.15.RELEASE/spring-webmvc-3.2.15.RELEASE.pom Download https://repo1.maven.org/maven2/org/springframework/spring-jdbc/3.2.15.RELEASE/spring-jdbc-3.2.15.RELEASE.pom Download https://repo1.maven.org/maven2/org/springframework/spring-context-support/3.2.15.RELEASE/spring-context-support-3.2.15.RELEASE.pom
source share