VanillaGradle doesn't have genIntellijRuns


I set up my project like the docs explain. My build.gradle(excerpt): Gist.
setupDecompWorkspace runs fine.

My problem is that there is no genIntelliJRuns task like with Forge.

Can anyone please help me?

Interestingly, there are three versions of the vanillagradle plugin: Gradle - Plugins

The docs say I should use the server version. That explains why there are no run tasks.
I have switched to the merged version -> there is genIntellijRuns. It created the run configurations. Both(server and client) have a red cross showing “GradleStartServer is not in this module”. Running this config results in “main class not found”. There aren’t any files in the run folder.

Running the runServer gradle task results in MISSING REPLACEMENT DATA FOR RUN_CLIENT_MAIN.

minecraft {
    version = "1.11.2"
    mappings = "snapshot_20170529"
    runDir = "run"

Am I doing it right with the merged version instead of the server one?

Poking @Minecrell since it’s his thing.

That’s correct, and it’s actually the only difference between VanillaGradle and ForgeGradle’s tweaker plugins. VanillaGradle is intended for projects that cannot be run directly. Sponge plugins require an additional Sponge implementation (e.g. SpongeVanilla or SpongeForge) to run, you cannot run them using only the Minecraft source.

If you want to run a plugin with VanillaGradle, you should run it like a regular plugin: Either by compiling it using Gradle and loading it in a production environment, or by adding it to the classpath of a Sponge development workspace.

1 Like

Currently I am adding the sponge vanilla server jar to the classpath of a new run config and let it start the server and let it scan the classpath for plugins(which loads my plugin).
Described here: Change launcher to Idea's jar launcher · Issue #4 · Qixalite/SpongeStart · GitHub (I hope spongestart gets updated soon).

Thanks for the explanation.