Gradlew behind a proxy

Use this in prompt line:

gradle -Dhttp.proxyHost=***  -Dhttp.proxyPort=*** -Dhttp.proxyUser=**** -Dhttp.proxyPassword=****

Works here!


All you have to do is to create a file called gradle.properties (with the properties you mentioned above) and place it under your gradle user home directory (which defaults to USER_HOME/.gradle) OR in your project directory.

Gradle (the wrapper too!!!) automatically picks up gradle.properties files if found in the user home directory or project directories.

For more info, read the Gradle user guide, especially at section 12.3: Accessing the web via a proxy


If you need https access behind a proxy, please consider defining also the same set of properties for systemProp.https.

systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080

See Can't build Android app using crashlytics behind VPN and proxy for more information.

Tags:

Gradle

Gaelyk