Proxy setting
1. git
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
2. gradle
Scenario build.gradle example:
repositories {
mavenCentral()
}
dependencies {
compile "joda-time:joda-time:2.2"
}
When running gradle build, it fails with Connect to https://repo1.maven.org/maven2/joda-time/joda-time/2.2/ timeout
Solution: you can put a file named gradle.properties under your project direcory (or in the Gradle home directory), and put the following content inside:
systemProp.https.proxyHost=yourProxyxxx
systemProp.https.proxyPort=xxx
systemProp.https.proxyUser=xxx
systemProp.https.proxyPassword=xxx
Notice that http doesnot work for this case ORZ...(why? #TODO)