Updated build script to use toolchains #91

Closed
gudenau wants to merge 1 commits from master into master
gudenau commented 2021-03-19 01:37:35 +00:00 (Migrated from github.com)

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.

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.
modmuss50 (Migrated from github.com) requested changes 2021-03-19 08:17:18 +00:00
modmuss50 (Migrated from github.com) left a comment

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.

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.
gudenau commented 2021-03-19 08:53:48 +00:00 (Migrated from github.com)

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.

> 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.
modmuss50 commented 2021-03-19 09:00:24 +00:00 (Migrated from github.com)

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.

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.
gudenau commented 2021-03-19 09:08:02 +00:00 (Migrated from github.com)

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.

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

Sign in to join this conversation.