How can I set gradle proxy to socks


(Aha) #1

I use socks as my proxy server.
And I put those in my gradle_home/gradle.properties

systemProp.http.proxyHost=socks5://127.0.0.1
systemProp.http.proxyPort=1080

systemProp.https.proxyHost=socks5://127.0.0.1
systemProp.https.proxyPort=1080

But the ./gradlew task’s log syas:

Gradle Bintray Plugin version: 1.6
Using proxy null:@socks5://127.0.0.1:1080

Execution failed for task ':thyi:bintrayUpload'.
> java.net.UnknownHostException: socks5://127.0.0.1

My questions is, can I use sock proxy in gradle. And how can I set this.

Thanks!


(Aha) #2

I have resolve it.

add this line to gradle.properties

org.gradle.jvmargs=-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=7077


(Weekend) #3

Thanks and: Is there “-Dxxx” equivalent for “system.Prop.http.nonProxyHost”?

Update: ref https://stackoverflow.com/a/27728848/1819810, maybe the answer is no?