I’m using Gradle 6.7 in Ubuntu 20.04 behind a corporate proxy requiring basic authentication to compile the JVARKIT.
Unfortunately, Gradle is not able to download required dependencies, regardless of the provided settings, neither via ~/.gradle/gradle.properties
nor via command line (-Dhttps.proxyHost=...
) nor providing it via export ANT_OPTS=
.
Then I enabled ant.lifecycleLogLevel = "VERBOSE"
in build.gradle
and I expected to see something like [ant:setproxy] Setting proxy to ...
but it is not logged.
After adding ant.setproxy(proxyHost: ant.properties['https.proxyHost'], proxyPort: ant.properties['https.proxyPort'], proxyUser: ant.properties['https.proxyUser'], proxyPassword: ant.properties['https.proxyPassword'])
to build.gradle
I get the expected log line and Gradle downloads the dependencies.
IMHO, neither Ant nor Gradle uses the environment or command line proxy variables except ant.setproxy(...)
is called. Is this a Gradle or Ant bug?
–
Thanks,
Mathias