Skip to content

Latest commit

 

History

History
139 lines (107 loc) · 3.77 KB

File metadata and controls

139 lines (107 loc) · 3.77 KB

Migration Tips

4.x <- 3.x

Plugin ID Change

The Spigot plugin ID has been renamed for consistency:

plugins {
-   id("io.typst.spigradle") version "3.7.3"
+   id("io.typst.spigradle.spigot") version "4.0.2"
}

Task Name Changes

All platform tasks have been renamed for clarity:

Old (3.x) New (4.x)
detectSpigotMain detectSpigotEntrypoints
detectBungeeMain detectBungeeEntrypoints
detectNukkitMain detectNukkitEntrypoints
generateSpigotDescription generateSpigotPluginDescription
generateBungeeDescription generateBungeePluginDescription
generateNukkitDescription generateNukkitPluginDescription

Extension Property Changes

Property names changed from plural to singular:

spigot {
-   depends = listOf("Vault", "ProtocolLib")
-   softDepends = listOf("WorldEdit")
+   depend = listOf("Vault", "ProtocolLib")
+   softDepend = listOf("WorldEdit")
}

debugSpigot {
-   downloadSoftDepends = true
+   downloadSoftDepend = true
}

Load Property

The Load enum has been removed. Use string literals instead:

-import io.typst.spigradle.spigot.Load

spigot {
-   load = Load.STARTUP      // or Load.POST_WORLD
+   load = "STARTUP"         // or "POSTWORLD"
}

New Base Plugins

New base plugins provide extension and repository DSL without YAML generation:

  • io.typst.spigradle.spigot-base
  • io.typst.spigradle.bungee-base
  • io.typst.spigradle.nukkit-base

Use base plugins when you only need dependency shortcuts without automatic plugin.yml generation.

New Feature: Version Catalogs

Version Catalogs are now available for managing Spigradle plugins and dependencies:

settings.gradle.kts

dependencyResolutionManagement {
    repositories {
        mavenCentral()
    }
    versionCatalogs {
        create("spigots") {
            from("io.typst:spigot-catalog:1.0.0")
        }
        create("commons") {
            from("io.typst:common-catalog:1.1.0")
        }
    }
}

build.gradle.kts

plugins {
    java
    alias(spigots.plugins.spigot)
    alias(commons.plugins.ideaExt) // optional, for debug Run Configurations
}

repositories {
    mavenCentral()
    spigotRepos {
        papermc()
        jitpack()
    }
}

dependencies {
    compileOnly(spigots.paper.api)
    compileOnly(spigots.protocolLib)
    compileOnly(spigots.vault.api)
}

Available catalogs:

  • io.typst:spigot-catalog - Spigot/Paper dependencies and plugins
  • io.typst:bungee-catalog - BungeeCord dependencies and plugins
  • io.typst:nukkit-catalog - NukkitX dependencies and plugins
  • io.typst:common-catalog - Common dependencies (Lombok, idea-ext, etc.)

3.x <- 2.x

  • The groupId has been changed from kr.entree.spigradle to io.typst.spigradle.
  • No more implicit repo/dep: need to declare repository(spigotmc)
  • No more @Plugin annotation: the main class will be detected automatically.
  • The Gradle version must be 8.x or higher (ex: 8.14.3)
    • If you use gradle wrapper, edit the distributionUrl in gradle/wrapper/gradle-wrapper.properties ex) gradle-8.14.3-all.zip
  • The Gradle JVM version must be 17 or higher.
  • The options main, name, version, description are changed type Property from String
    • Configuration example: spigot { description.set("my description") }

img.png

2.x <- 1.x

  • The task spigotPluginYaml renamed to generateSpigotDescription
  • The annotation @Plugin repackaged to @io.typst.spigradle.annotations.Plugin.