title: Set Nexus repository in build.gradle for android studio
body: <p>I would like to set a nexus repo in my gralde config to access some local libraries.</p>
  
  <p>Do I need to set the nexus repo in my gradle config like following ?</p>
  
  <pre><code>repositories {
      mavenLocal()
      maven {
          url "http://mySuperRepo/nexus/content/groups/public/"
      }
  
      jcenter()
  }
  </code></pre>
  
  <p>I have already set the nexus in the maven config file (settings.xml in m2)</p>
  
  <pre><code>&lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  
  &lt;proxies&gt;
      &lt;proxy&gt;
          &lt;active&gt;true&lt;/active&gt;
          &lt;protocol&gt;http&lt;/protocol&gt;
          &lt;host&gt;proxy.host.com&lt;/host&gt;
          &lt;port&gt;8081&lt;/port&gt;
          &lt;username&gt;username&lt;/username&gt;
          &lt;password&gt;password&lt;/password&gt;
          &lt;nonProxyHosts&gt;nonProxyHost.net&lt;/nonProxyHosts&gt;
      &lt;/proxy&gt;
  &lt;/proxies&gt;
  
  &lt;servers&gt;
      &lt;server&gt;
              &lt;id&gt;nexus&lt;/id&gt;
              &lt;username&gt;useeeername&lt;/username&gt;
              &lt;password&gt;passwoooord&lt;/password&gt;
      &lt;/server&gt;
  &lt;/servers&gt;
  
  &lt;mirrors&gt;
      &lt;mirror&gt;
              &lt;id&gt;idMyMirror&lt;/id&gt;
              &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
              &lt;url&gt;http://mySuperRepo/nexus/public/&lt;/url&gt;
      &lt;/mirror&gt;
  &lt;/mirrors&gt;
  </code></pre>
  
  <p></p>
  
  <p>My problem is that AndroidStudio seems to download all the nexus repo in my laptop. The .AndroidStudio/ folder take 48Gb. If I delete this folder, the next time I open android studio everything is downloaded again.</p>
  
  <p>Do you have a solution please ?</p>