/spigradle

Intelligent Gradle plugin for Bukkit, Bungeecord and NukkitX.

Primary LanguageKotlinApache License 2.0Apache-2.0

Spigradle · Download License

An intelligent Gradle plugin used to develop plugins for Spigot, Bungeecord and NukkitX.

Benefits

  • Description file generation: plugin.yml and/or bungee.yml

  • Main class detection

  • Debug tasks

  • Shortcuts for repository and dependency

plugins {
    id 'java'
    id 'kr.entree.spigradle' version '2.2.3'
}

group 'org.sample'
version '1.0-SNAPSHOT'

dependencies {
    compileOnly spigot('1.15.2')
}

Table of contents

Plugins

Spigot

Documentation

Demo

Groovy DSL

plugins {
    id 'java'
    id 'kr.entree.spigradle' version '2.2.3'
}

dependencies {
    compileOnly spigot('1.15.2')
}
Kotlin DSL
import kr.entree.spigradle.kotlin.*

plugins {
    kotlin("jvm") version "1.3.72"
    id("kr.entree.spigradle") version "2.2.3"
}

dependencies {
    implementation(kotlin("stdlib-jdk8"))
    compileOnly(spigot("1.15.2"))
}
Groovy Legacy
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'kr.entree:spigradle:2.2.3'
    }
}

apply plugin: 'kr.entree.spigradle'
Kotlin Legacy
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath("kr.entree:spigradle:2.2.3")
    }
}

apply(plugin = "kr.entree.spigradle")

Bungeecord

Documentation

Demo

Groovy DSL

plugins {
    id 'java'
    id 'kr.entree.spigradle.bungee' version '2.2.3'
}

dependencies {
    compileOnly bungeecord('1.15')
}
Kotlin DSL
plugins {
    kotlin("jvm") version "1.3.72"
    id("kr.entree.spigradle.bungee") version "2.2.3"
}

dependencies {
    implementation(kotlin("stdlib-jdk8"))
    compileOnly(bungeecord("1.15"))
}
Groovy Legacy
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'kr.entree:spigradle:2.2.3'
    }
}

apply plugin: 'kr.entree.spigradle.bungee'
Kotlin Legacy
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath("kr.entree:spigradle:2.2.3")
    }
}

apply(plugin = "kr.entree.spigradle.bungee")

NukkitX

Documentation

Demo

Groovy DSL

plugins {
    id 'java'
    id 'kr.entree.spigradle.nukkit' version '2.2.3'
}

dependencies {
    compileOnly nukkit('1.0')
}
Kotlin DSL
plugins {
    kotlin("jvm") version "1.3.72"
    id("kr.entree.spigradle.nukkit") version "2.2.3"
}

dependencies {
    implementation(kotlin("stdlib-jdk8"))
    compileOnly(bungeecord("1.15"))
}
Groovy Legacy
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'kr.entree:spigradle:2.2.3'
    }
}

apply plugin: 'kr.entree.spigradle.nukkit'
Kotlin Legacy
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath("kr.entree:spigradle:2.2.3")
    }
}

apply(plugin = "kr.entree.spigradle.nukkit")

Requirements

All the plugins requires Gradle 5.4.2+, recommends the latest.

To update your gradle wrapper:

gradlew wrapper --gradle-version 6.6 --distribution-type all

Repositories

Name URL Relations Aliases
spigotmc() https://hub.spigotmc.org/nexus/content/repositories/snapshots/ spigot()
sonaytype() https://oss.sonatype.org/content/repositories/snapshots/ bungeecord()
papermc() https://papermc.io/repo/repository/maven-public/ paper()
jitpack() https://jitpack.io Vault vault()
protocolLib() https://repo.dmulloy2.net/nexus/repository/public/
enginehub() https://maven.enginehub.org/repo/ worldguard, worldedit, commandhelper...
codemc() https://repo.codemc.org/repository/maven-public/ BStats bStats()
enderZone() https://ci.ender.zone/plugin/repository/everything/ EssentialsX essentialsX()
frostcast() https://ci.frostcast.net/plugin/repository/everything BanManager banManager()
nukkitX() https://repo.nukkitx.com/maven-snapshots NukkitX

Groovy usage

repositories {
    engienhub()
}

Kotiln usage

import kr.entree.spigradle.kotlin.*

repositories {
    enginehub()
}

Dependencies

Name Signature Default version
spigot(version) org.spigotmc:spigot-api:$version 1.16.1-R0.1-SNAPSHOT
spigotAll() org.spigotmc:spigot:$version 1.16.1-R0.1-SNAPSHOT
bungeecord() net.md-5:bungeecord-api:$version 1.16-R0.4-SNAPSHOT
minecraftServer() org.spigotmc:minecraft-server:$version 1.16.1-SNAPSHOT
paper() com.destroystokyo.paper:paper-api:$version 1.16.1-R0.1-SNAPSHOT
bukkit() org.bukkit:bukkit:$version 1.16.1-R0.1-SNAPSHOT
craftbukkit() org.bukkit:craftbukkit:$version 1.16.1-R0.1-SNAPSHOT
lombok() org.projectlombok:lombok:$version 1.18.12
spigradle() kr.entree:spigradle:$version 2.2.3
protocolLib() com.comphenix.protocol:ProtocolLib:$version 4.5.1
vault() com.github.MilkBowl:VaultAPI:$version 1.7
vaultAll() com.github.MilkBowl:Vault:$version 1.7.3
luckPerms() me.lucko.luckperms:luckperms-api:$version 5.1
worldedit() com.sk89q.worldedit:worldedit-bukkit:$version 7.1.0
worldguard() com.sk89q.worldguard:worldguard-bukkit:$version 7.0.3
essentialsX() net.ess3:EssentialsX:$version 2.17.2
banManager() me.confuser.banmanager:BanManagerBukkit:$version 7.3.0-SNAPSHOT
commandhelper() com.sk89q:commandhelper:$version 3.3.4-SNAPSHOT
bStats() org.bstats:bstats-bukkit:$version 1.7
bStatsLite() org.bstats:bstats-bukkit-lite:$version 1.7
nukkit cn.nukkit:nukkit:$version 2.0.0-SNAPSHOT

Groovy usage

dependencies {
    compileOnly spigot("1.15.2") // or just spigot()
}

Kotlin usage

import kr.entree.spigradle.kotlin.*

dependencies {
    compileOnly(spigot("1.15.2")) // or just spigot()
}

See also

Supporters

JetBrains OS License