ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Gradle-wrapper fails to download gradle when behind a proxy

Open jabyrd3 opened this issue 11 years ago • 10 comments

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.

jabyrd3 avatar Feb 03 '15 15:02 jabyrd3

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.

jabyrd3 avatar Feb 03 '15 16:02 jabyrd3

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

jbavari avatar Feb 03 '15 22:02 jbavari

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

jbavari avatar Feb 10 '15 22:02 jbavari

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

oyevtushok avatar Feb 13 '15 13:02 oyevtushok

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

r-cohen avatar Apr 17 '15 07:04 r-cohen

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

ruslan-kurkebayev avatar Jul 15 '16 06:07 ruslan-kurkebayev

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..

tacoben avatar Dec 15 '16 03:12 tacoben

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 avatar Mar 09 '18 08:03 TudorIoanMarin

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

spainFAN avatar May 10 '18 08:05 spainFAN

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

hron84 avatar Aug 23 '19 13:08 hron84