Use Windows trust store in build script does not work?

The JRE can be set to use the Windows trust store via javax.net.ssl.trustStoreType=Windows-ROOT.
However, Gradle seems to have its own trust store handling which does not respect this setting.
As far as I understand the code in DefaultSslContextFactory.java, there always needs to be a trust store file (javax.net.ssl.trustStore=FILE) or code will fall back to use the default JRE files.

Is there something I am missing? I really would like to use the Windows trust store for accessing my company’s repositories via HTTPS.

I just created an issue since I think this is a bug: