ForgeGradle in SpongeVanilla

As a preface, I had a project that I wanted to use MCP mappings with, and couldn’t figure out a nice integration with gradle, so I went and checked out the SpongeVanilla and SpongeCommon build.gradles, and noticed something:

Both SpongeVanilla and SpongeCommon depend on, extend, and use ForgeGradle. Looking at the oh-so-descriptive ForgeGradle README.MD, it describes ForgeGradle as such:

Minecraft mod development framework used by Forge and FML for the gradle build system

This leads me to believe that ForgeGradle does not implicitly download/add dependencies for Forge, but rather just handle MCP mappings. This is where I get confused. Within a forge mod project, no forge dependency is declared in the build.gradle, only ForgeGradle, and the dependency on ForgeGradle is commented on with the following:

// for people who want stable
plugins {
    id "net.minecraftforge.gradle.forge" version "2.0.2"

So my question is, what the heck is ForgeGradle. How does SpongeCommon and SpongeVanilla avoid dependencies on Forge, and if ForgeGradle doesn’t actually supply these dependencies, how are they supplied in a mod project?

Anyway, thanks for any answers. Just trying to figure out what this thing is for…

My understanding is that ForgeGradle can actually be separated into three “sub-plugins.” There’s the main plugin that pulls in Forge (the one in your example), then there’s “tweaker-server” and “tweaker-client” that use plain-old vanilla (SpongeVanilla uses the former of these two).

Currently we use VanillaGradle which modifies ForgeGradle to remove the dependency on forge

ForgeGradle has native Vanilla support with the tweaker plugins in 2.0+, they don’t depend on Forge in any way, they just happen to be included in a Gradle plugin that is called ForgeGradle.

VanillaGradle is no longer used for “vanilla” itself, but just contains a few fixes that prevented the project from running with a multi-project like Sponge. It is only used in SpongeCommon; SpongeVanilla is using ForgeGradle’s tweaker-server plugin.

If you don’t know what you’re talking about then don’t reply. ForgeGradle doesn’t imply a dependency on forge, ask anyone who’s been using it to develop liteloader mods for the last couple of years.

Well that makes a whole lot of sense! Thanks for your responses!