MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Automatically add shadow plugin when making a Gradle plugin

Open CerialPvP opened this issue 2 years ago • 3 comments

Minecraft Development for IntelliJ plugin version

2022.1-1.5.21

Description of the feature request

Whenever you make a Bukkit, Spigot or Paper plugin, add the shadow plugin automatically to the build.gradle file. This would be your plugins section in the build.gradle with the shadow plugin:

plugins {
    id 'com.github.johnrengelman.shadow' version '7.1.2'
    id 'java'
}

The shadow plugin then allows users to make the plugin into a singular jar with all dependencies by doing .\gradlew.bat shadowJar (or gradlew shadowJar on Linux systems).

CerialPvP avatar Jan 05 '23 13:01 CerialPvP

I don't see why we'd need to add the shadow plugin in the default templates when it is useless as-is. The default jar should already contain the plugin's compiled classes and that's all that's needed in the default "scenario" the templates are made for.

RedNesto avatar Jan 05 '23 15:01 RedNesto

In my opinion, it would be better to wait until the end of the project wizard rewrite before talking about it, or even implementing it.

Mysterious-Dev avatar Jan 05 '23 15:01 Mysterious-Dev

I think at some point the templates did include it, but it doesn't seem like the template's place to configure that for you.

The plugin is intended to make it quick and easy to get started, it's not intended to configure everything for you.

DenWav avatar Mar 18 '23 21:03 DenWav