PluginJar is a Gradle plugin designed to simplify the creation of plugin.yml files for Minecraft plugins.
By using this plugin, there is no need to use ShadowJar to merge projects in a Gradle multi-project environment. This plugin is specifically designed to avoid the creation of fatjars in Minecraft plugin development.
- Add the following to your
build.gradle.ktsfile.
plugins {
id("kr.junhyung.pluginjar") version "0.0.4"
}- Annotate your main plugin class with @Plugin annotation.
@Plugin
public class ExamplePlugin extends JavaPlugin {
@Override
public void onEnable() {
System.out.println("Hello, PluginJar!");
}
}- Build your project by running the following task.
./gradlew pluginJar
| Property | Source |
|---|---|
| name | Root project name. |
| main | Fully qualified name of the class with @Plugin annotation, auto-detected. |
| version | Project version. |
| api-version | Automatically determined from Bukkit API implementation dependency in the compileClasspath. |
| description | Project description. |
| libraries | Dependencies collected from the runtimeClasspath. If the project depends on other projects at runtime, their dependencies are also included. |
There are some properties in plugin.yml that you need or want to manually declare. You can declare properties like this:
pluginJar {
depend = listOf("Vault", "ProtocolLib")
softDepend = listOf("PlaceholderAPI")
}Licensed under the Apache License, Version 2.0