How to use socks with gradle for dependency resolving, in command line?

I found answer, here you can use:

./gradlew -DsocksProxyHost=yourHost 
-DsocksProxyPort=yourHostPort your-command

using above you can set socks host and port.


Gradle only documents about how to use HTTP(s) proxy, however in the ant source code it mentions, there is enough information about how to setup the SOCKS proxy.

Add the following two lines to the gradle.properties configuration file and you are done.

systemProp.socksProxyHost=your socks proxy ip
systemProp.socksProxyPort=your socks proxy port

The format of SOCKS configuration names (socksProxyHost and socksProxyPort) differs from HTTP proxy host and port configurations (http.proxyHost and http.proxyPort).

Tags:

Socks

Gradle