Configuring java toolchain

Hi,
I would like to use gradle to automatically download the correct java toolchain, but I need to configure it after the download (for example to install a custom CA) in order to be working in my organization.
I was not able to find any “standard” way to configure the toolchain after it has been installed: do you have any suggestion?

Thanks!

I don’t think there is.
Or maybe with a custom toolchain provisioner, that does the modifications on the fly while downloading.

But it might maybe be easier and cleaner to just use System properties to set a custom keystore / truststore.
You can do that for example from gradle.properties using a prefix.

Ok, thanks, I will try that. Not sure if other certificates are required, but I don’t think so, as it is just about building application (so we just need to access the internal artifact repository)

But that should then be totally irrelevant regarding toolchains anyway.
The toolchain is used for started forked tasks like compilation, testing, code quality analysis and so on.
But dependency resolution is done in the Gradle process and with the Java version that is used to execute Gradle.
Actually, only due to that setting the system properties via gradle.properties would also work as otherwise it would be set in the wrong process.