1. git

git config --global http.proxy http://proxyuser:[email protected]: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)
05-08 14:49