Analyse ssl error with gradle (-Djavax.net.debug=ssl seems not to be respected)

I wan’t to investigate a SSL error happening when resolving a maven-dependency.
In my naivety, I thought this will do the trick.

export GRADLE_OPTS=-Djavax.net.debug=ssl

But it doesn’t. There is no SSL output at all. Also appending

--debug

Does not help. How can I turn on the SSL log then?