How to configure the gradle setting dependency storage directory?

How to configure the gradle setting dependency storage directory? Why can’t I find anything in the official documentation? This is very important. Dependencies take up a lot of space for me. How do I configure the dependent storage directory and how to verify my configuration through the gradle command?

There are multiple ways to configure the Gradle User Home in the Gradle Build Environment section. This section also provides links to directory layout details about this structure and how retention policies can be customized.