How to select Gradle directory

I am not sure if the topic has been brought up before but I am wandering is their a way to select Gradle directory and tell it where to store its files and not use ".gradle"/(default directory) especially as it cannot be hidden.
Thank you for your help.

1 comment
Comment actions Permalink

You can specify the project-specific cache directory for Gradle using --project-cache-dir command line option
Default value is .gradle in the root project directory, see gradle documentation Section 14.6, “Caching” for details.

P.S if you use IDEA for gradle task invocation you can specify --project-cache-dir in Gradle Run Configuration in "Script parameters" section. Note, currently the option is not avalialable for gradle project import yet.


Please sign in to leave a comment.