MinecraftForge / ForgeGradle

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

Support customization of the java launcher for run tasks #889

Closed TheMrMilchmann closed 2 years ago

TheMrMilchmann commented 2 years ago

Since the run tasks are created after the project has been evaluated, "setting" the javaLauncher makes it extremely difficult to customize the launcher. This becomes apparent when using a more recent Java version for the build process (which can be useful to evade rare compiler bugs) while still targeting old bytecode. To enable users to configure the launcher more easily, the task is updated to set the default value for the launcher. Setting the value via any of the Provider#set methods from user code now will work as expected and the current default behavior is preserved.