I noticed that my run configs were using JDK8 only if I previously had run the clean task.
Turns out that HackyJavaCompile accidentally changes the entire project's toolchain to lookup the right Java compiler.
Thankfully the toolchain service has a method to lookup compilers without using the toolchain from the project level.
(Note though: this will ignore the distribution that may be set on the project-level toolchain for HackyJavaCompile).
I noticed that my run configs were using JDK8 only if I previously had run the clean task. Turns out that HackyJavaCompile accidentally changes the entire project's toolchain to lookup the right Java compiler. Thankfully the toolchain service has a method to lookup compilers without using the toolchain from the project level.
(Note though: this will ignore the distribution that may be set on the project-level toolchain for HackyJavaCompile).