I\'m running into issues building android projects on a server in a corporate network behind a proxy on Jenkins. Have tried with both the jenkins gradle, as well as gradlew.
You have to add the following configuration in gradle.configuration
.These are the proxy settings needed to be configured if you are working behind proxy.
Source: (https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy)
And don't add 'http.// or 'https:' in systemProp.http.proxyHost
only 'www.host.com'
.Also comment out the systemProp.http.proxyUser
or proxypassword
if you don't need it to login into the proxy.
systemProp.proxySet=true
systemProp.http.keepAlive=true
systemProp.http.proxyHost=www.host.com
systemProp.http.proxyPort=port
systemProp.http.proxyUser=username_ifneeded
systemProp.http.proxyPassword=password_needed
systemProp.http.nonProxyHosts=local.net|some.host.com
systemProp.https.keepAlive=true
systemProp.https.proxyHost=host
systemProp.https.proxyPort=port
systemProp.https.proxyUser=username_ifneeded
systemProp.https.proxyPassword=password_ifneeded
systemProp.https.nonProxyHosts=local.net|some.host.com