Updated build script to use toolchains #91
Reference in New Issue
Block a user
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This will help to prevent some weird compiler differences that occur as Java matures. This even fixes some weirdness that can happen when using the classic javac flags.
No, this has specially not been done as this will now always use java 8, we want it to compile on newer java versions where possible.
This is taking steps backwards imo.
There are a couple of APIs that cause Java 9+ based JDKs to fail compiling on that are still in Java 16. You can also fairly easily add tasks that use specific Java versions as well.
I'm not sure why Loom doesn't respect this setting however, would be useful to be able to create different run tasks that target different Java versions for testing.
We set the compiler release flag to ensure that stuff compiled on newer versions runs on J8. We want mods thst can be built and ran on newer java versions, github actions is setup to build on 8, 11 and 15 to aid with this. All of fabric's stuff is built on java 15 but runs without issue on 8.
There is an issue open for loom to respect this, partly blocked (tho reflection could be used) by the fact loom is building on a pre toolchain version of gradle.
I suppose if you need more advanced things like MRJs with this (assuming the remapper ever gets fixed) you'll have to know a lot about Gradle anyway.
Pull request closed