gradlesocks

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


When jcenter is not accessible without proxy server, to resolve dependencies, and i want to use socks instead of http proxy, how i can use it in commanad line? I know how to use http proxy:

-Dhttp.proxyHost=yourProxy -Dhttp.proxyPort=yourPort  
-Dhttp.proxyUser=usernameProxy -Dhttp.proxyPassword=yourPassoword

Solution

  • I found answer, here you can use:

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

    using above you can set socks host and port.