When starting the Gradle daemon using the Tooling API, specifying the JDK home for the daemon seems to be ignored and the one executing the code of the Tooling API is used instead.
For example: If I use the Tooling API from JDK 1.6 and try to compile a code using Java7 apis (like ‘java.util.Objects’), compilation fails.
I have tried to set the JDK the following ways (even all of them at once): - Set JAVA_HOME. - Adding “-Dorg.gradle.java.home=…” as a JVM argument. - Specifying it through ‘BuildLauncher.setJavaHome’