修改 ~/.gradle/gradle.properties 文件,添加代理配置。
对于http和https代理,添加如下内容:
systemProp.http.proxyHost=<host>
systemProp.http.proxyPort=<port>
# systemProp.http.proxyUser=<user>
# systemProp.http.proxyPassword=<password>
# systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=<host>
systemProp.https.proxyPort=<port>
# systemProp.https.proxyUser=<user>
# systemProp.https.proxyPassword=<password>
# systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
对于socks代理,添加如下内容:
systemProp.socks.proxyHost=localhost
systemProp.socks.proxyPort=9090
# systemProp.socks.proxyUser=<user>
# systemProp.socks.proxyPassword=<password>
# systemProp.socks.nonProxyHosts=*.nonproxyrepos.com|localhost
网友评论