Ionic-cli: Gradle-wrapper fails to download gradle when behind a proxy

Created on 3 Feb 2015  路  10Comments  路  Source: ionic-team/ionic-cli

Hey,

I'm seeing an issue where gradle is not honoring the proxy environment variable when trying to build with Crosswalk added. It looks like the connect library is timing out.

I attempted to add proxy settings to the gradle-wrapper.properties file as reccomened here in example 20.1: https://gradle.org/docs/current/userguide/build_environment.html.

The properties file gets overwritten by the build process itself and it doesn't respect my proxy settings in there either.

bug

Most helpful comment

putting my proxy details in platforms/android/gradle.properties file helped me.

systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost

All 10 comments

Update: I was able to fix this via the https.proxyUrl example in my comment above. Still, there should probably some way to set that variable if there is the ionic proxy environment variable is set already.

Alright, i'll look into it. Thanks for reporting.

@jabyrd3 - have you tried using the gradle.properties file in platforms/android instead? That file shouldn't get over-ridden.

I used to have the same problem and indeed adding http/https proxy settings to platforms/android/gradle.properties helped

also fixed on my side updating proxy info in the platforms/android/gradle.properties.

putting my proxy details in platforms/android/gradle.properties file helped me.

systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost

hey folks - for a number of reasons I dont want to set things on the gradle.properties file and want to put these props in a commandline arguement...

anyone have any luck figuring out how to do this? I am dead in the water. Cant use D or P inputs at commandline..

Hi, for ionic 3 there is no gradle.properties file in platforms/android, only a project.properties and setting the proxy there is not working for me. Any thoughts?

@TudorIoanMarin did you manage to configure the proxy in Ionic 3?

@TudorIoanMarin proxy config should go to gradle.properties in your home folder

Was this page helpful?
0 / 5 - 0 ratings