MinecraftForge / ForgeGradle

Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
509 stars 437 forks source link

[FG5] Fix HackyJavaCompile overriding the global project toolchain #799

Closed shartte closed 3 years ago

shartte commented 3 years ago

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).