Search code examples
gradlegaelyk

Gradlew behind a proxy


I have a sample from Gaelyk (called Bloogie) and it is using gradlew.

I am behind a proxy.

I've read gradle docs and found this:

gradle.properties

systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password

But I have no clue how to put this info into the wrapper gradlew. Any idea?


Solution

  • All you have to do is to create a file called gradle.properties (with the properties you mentioned above) and place it under your gradle user home directory (which defaults to USER_HOME/.gradle) OR in your project directory.

    Gradle (the wrapper too!!!) automatically picks up gradle.properties files if found in the user home directory or project directories.

    For more info, read the Gradle user guide, especially at section 12.3: Accessing the web via a proxy