neoforged / MDK

The Mod Developer Kit - this is where you start if you want to develop a new mod
https://github.com/NeoForgeMDKs
183 stars 60 forks source link

Update to gradle 8.8 and use new daemon toolchain feature #67

Open lukebemish opened 1 month ago

lukebemish commented 1 month ago

With neogradle 7.0.138, java 17 or higher is now required to run neogradle; thanks to a new feature in gradle 8.8, we can require that gradle run with a specific java version. This PR upgrades neogradle to 7.0.138, gradle to 8.8, and sets the required gradle toolchain to J21. I picked J21 instead of J17 -- which is the minimum version needed -- because this version is an exact match and I thought it more likely that this would be installed in a locatable location than J17.

Some feedback is needed on this. Is this too likely to cause confusion about being unable to locate a JVM, compared to the confusion it alleviates about NG running with the wrong JVM? Should it use J17 for gradle -- the minimum needed by NG -- or J21 -- the current version used by MC which may be more likely to be present on the system (though I'm truly not entirely sure of that)?

Shadows-of-Fire commented 1 month ago

I think this is fine, regardless of the minimum requirement actually set by NG, users will need J21 around to actually do anything, and we recommend that J21 be installed (rather than J17).

lukebemish commented 1 month ago

Users do not actually need J21 around to do anything because gradle will install it for you if it's missing. But it won't do that if this setting is set and it can't launch at all. Hence why I wasn't sure of the best approach.

Technici4n commented 1 month ago

What does the error message look like when the toolchain can't be found?