Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The wrapper script should honor http(s)_proxy variables #11065

Open
sschuberth opened this issue Oct 16, 2019 · 7 comments
Open

The wrapper script should honor http(s)_proxy variables #11065

sschuberth opened this issue Oct 16, 2019 · 7 comments
Labels
a:feature A new functionality in:wrapper

Comments

@sschuberth
Copy link
Contributor

sschuberth commented Oct 16, 2019

Expected Behavior

Running gradlew on a (Linux / Mac) system that has the http_proxy and / or https_proxy environment variables set should be able to download the configured Gradle distribution though the specified proxy.

Current Behavior

The gradlew script does not pass any proxy configuration from the http_proxy / https_proxy environment variables to the JVM that runs the Java implementation for the wrapper, resulting in the download of the Gradle distribution to fail on systems that can only access the Internet via a proxy.

Context

In environments behind a corporate proxy running a Gradle project's ./gradlew fails out of the box because the JVM does not know about the proxy even if http_proxy / https_proxy is set. A Gradle user has to manually pass the http(s).proxy* JVM system properties either directly to gradlew on the command line via -D, or configure them in the ~/.gradle/gradle.properties file.

This is inconvenient extra work and not in line with other package managers / build systems like e.g. Yarn which do respect http_proxy / https_proxy.

As such it would be nice if the gradlew script would by default parse http_proxy / https_proxy and pass the information on via the http(s).proxy* system properties to the JVM that runs the Java implementation for the wrapper.

@sschuberth sschuberth added a:feature A new functionality from:contributor labels Oct 16, 2019
sschuberth added a commit to sschuberth/gradle that referenced this issue Apr 18, 2020
Fixes gradle#11065.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
sschuberth added a commit to sschuberth/gradle that referenced this issue May 11, 2020
Fixes gradle#11065.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
@stale
Copy link

stale bot commented Nov 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Nov 26, 2020
@stale
Copy link

stale bot commented Dec 17, 2020

This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request.

@stale stale bot closed this as completed Dec 17, 2020
@augi
Copy link

augi commented Dec 17, 2020

IMHO still valid.

@gnaggnoyil
Copy link

@sschuberth I saw you once committed code that honor http(s)_proxy env vars in PR #12598, but later force pushed and removed those code. Do you still think it's a good idea to honor environment variables?

@sschuberth
Copy link
Contributor Author

Yes, I still think honoring the http(s)_proxy environment variables is a good idea. I just didn't want to do too many things at a time and keep the amount of changes to a minimum in that PR. And after my PR I didn't really need that feature anymore as I could use Gradle properties instead; honoring the environment variables would have just been convenience.

@HackToday
Copy link

if environment proxy variables be honored would be better, right now, seems need pass to program like -Dhttp.proxyHost etc.

@wolfs wolfs closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
@wolfs wolfs reopened this Sep 16, 2022
@wolfs wolfs removed the stale label Sep 16, 2022
@jbartok
Copy link
Member

jbartok commented Sep 15, 2023

Thank you for your interest in Gradle!

This feature request is in the backlog of the relevant team, but this area of Gradle is currently not in focus. It might take a while before it gets implemented.

@jbartok jbartok removed the to-triage label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:wrapper
Projects
None yet
Development

No branches or pull requests

7 participants