I have corporate environment with all http and https calls are behind the proxy.
I was able to fix some issues with command line downloads by putting exporting http_proxy environment variable into .profile file.
But with Robolectric 2.2 which is downloading android sources or classes before first run I failed. I don't have CI setup yet so I'm just trying to run tests from idea.
Does anyone know hot to fix it?
I've tried to provide proxy in IDEA settings, I've tried to provide additional environment variable in run configuration. Nothing helps
UPD When I specify proxy in Mac settings it is producing another error: Unable to find resource 'org.sonatype.oss:oss-parent:pom:7' in repository sonatype (https://oss.sonatype.org/content/groups/public/)
It looks like I'm probably using or missing wrong transitive dependency for Robolectirc (I don't use maven or ivy, I've just downloaded jars from maven central)
UPD2 Nope, It is just timeout again: Error transferring file: Operation timed out
I know that this is a little bit old Question but if you want to use proxy you should put the following file in your home/.m2 directory:
settings.xml
<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>your_host_here</host>
<port>your_port_here</port>
</proxy>
</proxies>
</settings>
For gradle look here https://docs.gradle.org/current/userguide/build_environment.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With