title: Change gradle's local repo cache location for Jenkins cloud build
body: <p>I need to change where repo downloads are saved. I cannot use the user home because my build is run on a cloud service which does not preserve this.</p>
  
  <p>This is causing my deps to be downloaded over and over and is chewing up a lot of cloud buld time.</p>
  
  <p>I am using gradle 1.0 milestone 5 and my build file has the following repos setup:</p>
  
  <pre><code>repositories {
      mavenLocal()
      mavenRepo urls: ['http://repo1.maven.org/maven2/', 'http://test-utils.googlecode.com/svn/maven-repo/snapshots']
      flatDir(name: 'fileRepo', dirs: "$projectDir/libs")
  }
  </code></pre>
  
  <p>(I have changed test-utils to hide some test lib I'm messing with).</p>
  
  <p>I have added this execute sh step before gradle build:</p>
  
  <pre><code>env GRADLE_USER_HOME="${WORKSPACE}"
  export GRADLE_USER_HOME="${WORKSPACE}"
  </code></pre>
  
  <p>But the deps must be being downloaded elsewhere still because my Jenkins build's workspace does not have any downloaded deps in it, but it does have some temp gradle files in it.</p>
  
  <p>Any ideas how I can make sure downloaded deps are placed in the $WORKSPACE so that I can avoid these downloads all the time?</p>