title: Gradle : Unable to tunnel through proxy
body: <p>I am trying to run a blank Flutter project behind a corporate proxy requiring basic authentication and self-signing HTTPS connections.</p>
  
  <p>I added the necessary config in <code>~/.gradle/gradle.properties</code> and in <code>~/.profile</code>. I also imported my root certificate in <code>$JAVA_HOME/jre/lib/security/cacerts</code> and told Gradle to use it. I even tried <a href="https://stackoverflow.com/a/43238418/5083247">this solution</a> and set <code>java.net.useSystemProxies=true</code> in <code>$JAVA_HOME/jre/lib/net.properties</code>.</p>
  
  <p>But, still, it doesn't build, and it asks for authentication.</p>
  
  <pre><code>flutter run
  Launching lib/main.dart on Nexus 5 in debug mode...
  Initializing gradle...                                0.8s
  Resolving dependencies...
  * Error running Gradle:
  Exit code 1 from: ~/GitLab/n.gendron/techno_store/android/gradlew app:properties:
  java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
  IOException: https://dl.google.com/android/repository/addons_list-3.xml
  java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
  IOException: https://dl.google.com/android/repository/addons_list-2.xml
  java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
  IOException: https://dl.google.com/android/repository/addons_list-1.xml
  java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
  Failed to download any source lists!
  </code></pre>
  
  <p><a href="https://serviceorientedarchitect.com/using-gradle-wrapper-behind-a-proxy-server-with-self-signed-ssl-certificates/" rel="nofollow noreferrer">This guide</a> helped me a lot trough this process, and <a href="http://blog.mindcrime-ilab.de/2015/05/20/dev-notesgradle-use-gradle-wrapper-with-self-signed-organization-local-certificates/" rel="nofollow noreferrer">this one</a> helped me import the CA, but now I'm stuck.</p>
  
  <p>Any idea?</p>