Gradle init insecure url

what i am doing wrong when i try to make gradle accept an insecure gradlewrapper url?

$ ./gradlew init --insecure-protocol=allow
> Failed to apply plugin 'org.gradle.wrapper'.
   > Loading a TextResource from an insecure URI, without explicit opt-in, is unsupported. The provided URI 'http://our-proxy/' uses an insecure protocol (HTTP).

The --insecure-protocol option

This option is used to tell the conversion process how to handle converting Maven repositories located at insecure http URLs. Insecure Repositories Set the –insecure-protocol option. The default value is warn.

So this is not what you think it is for.
What fails for you is the wrapper task that the init task depends on.
I wonder that it needs to load that resource at all, as you didn’t use one of the placeholders for the version.

So I’d say you hit two bugs here that you should report and post here for reference.

  1. that it at all tries to call those urls without being necessary.
  2. that it does not work with an insecure distribution URL and afaik does not have a way to accept it.
1 Like