MinecraftForge / ForgeGradle

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

Avoid eager creation of tasks in more places #852

Closed sciwhiz12 closed 2 years ago

sciwhiz12 commented 2 years ago

This does some small cleanup by avoiding the eager realization and creation of tasks (such as through TaskProvider#get), preferring to use lazy alternatives to configuring or passing around these tasks. This is done both in the FG codebase and in the buildscript.

Additionally, the manual (eager) definition of the sources jar task is replaced with the automatic (lazy) definition done using JavaPluginExtension#withSourcesJar(), with the sources jar being (lazily) configured to include the four source sets of FG.