I’d like to achieve the following:
- If a valid version of the JDK 6 can be found pre-installed use that for compilation
- Otherwise, if a valid version of the JDK7 can be found pre-installed, warn and use that for compilation
- Otherwise, fall back to an auto-provisioned version of the JDK 8 and warn.
Is there any way I can do so from within the build script?
I do not want to parse the output of gradle -q javaToolchains
, I’d like access to that information programmatically. Thanks.