Customise the list of InstallationSuppliers

I would like to create my own implementation of the InstallationSupplier interface (as used in the detection part of Java toolchains).

Ideally I would like this implementation to be the sole InstallationSupplier in the list injected into the constructor of the JavaInstallationRegistry.

I would appreciate help with the following (if they are possible).

  1. Creating a custom InstallationSupplier implementation that can be used as part of auto-detection with Java toolchains. - I am familiar with configuring the existing the existing implementations but they are insufficient for my needs.
  2. Overriding the List injected into the constructor of the JavaInstallationRegistry.

Many thanks in advance.

I’m not fully sure, but I doubt you can achieve either, except with using a custom Gradle distribution that you changed accordingly.

Thanks for the reply. I came to a similar conclusion but hoped that someone with greater knowledge than me might be able to shed some light on the problem.

1 Like