title: How to set the path to cache files of gradle?
body: <p>I started to use IntelliJ IDE to make a java program recently.
  I need to use gradle build tools but I am in trouble at building code.</p>
  
  <p>One of the problems is that gradle tried to make its working folder outside my project folder.</p>
  
  <p>In the previous project I made with grade, gradle automatically made a directory, .gradle under the project root directory like,</p>
  
  <pre><code>(project root directory)/.gradle
  </code></pre>
  
  <p>But now, it tries to make it under another directory like,</p>
  
  <pre><code>(USER_HOME)\Desktop\(PROJECT_NAME)\(PROJECT_NAME)\.gradle
  </code></pre>
  
  <p>I found the following debug message,</p>
  
  <pre><code>11:43:48.167 [DEBUG] [org.gradle.internal.buildevents.BuildLogger] Current dir: C:(USER_HOME)\Desktop\(PROJECT_NAME)\(PROJECT_NAME)
  </code></pre>
  
  <p>So, it seems gradle set the starting directory of building code as C:(USER_HOME)\Desktop(PROJECT_NAME)(PROJECT_NAME)</p>
  
  <p>and it makes .gradle folder under it.</p>
  
  <p>How can I change the starting directory to (project root directory) in gradle?
  Please let me know it. Thank you very much.</p>