Execute Gradle behind a corporate proxy network

This is the easiest way I found to handle Gradle under a network proxy.

In the root project that used Gradle, create a file gradle.properties , add the following config values


Replace the value marked by braces with appropriate values. For example, following is the config for HTTP and HTTPS protocols,


Afterward, run regular Gradle commands, it will automatically load this config for proxies.

For global configuration, just put that gradle.properties to Gradle home directory, which is usually at $HOME/.gradle

Have fun :)



Code / Design / Love @ https://petehouston.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store