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