Gradle build过程中使用代理:
command line
# socks5
gradle -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1080
# http
gradle -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=1080
# https
gradlew -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=1080
android studio
在gradle.properties文件中新增:
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=1080
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080