Skip to content

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

@sschuberth

Description

@sschuberth

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions