Skip to content

v2.1.0

Choose a tag to compare

@rainbowdashlabs rainbowdashlabs released this 22 Oct 17:30
· 19 commits to main since this release
v2.1.0
0a198ae

PublishData 2.1 adds a plugin manifest for Minecraft plugins. A manifest is a small JSON file published beside the jar that says which Minecraft versions, platforms, Java version and plugins a build needs, so a download site can read it without opening the jar.

Plugin manifest

plugins {
    id("de.chojo.publishdata") version "2.1.0"
    id("de.chojo.publishdata.manifest") version "2.1.0"
}

pluginManifest {
    minecraft("1.20.4", "1.21.4")
    optional("PlaceholderAPI", min = "2.11.0") {
        modrinth("placeholderapi")
        spigot(6245)
        hangar("HelpChat/PlaceholderAPI")
    }
    requires("ProtocolLib") {
        link("https://github.com/dmulloy2/ProtocolLib")
    }
}
  • New plugin de.chojo.publishdata.manifest. It publishes <artifact>-<version>-manifest.json with the classifier manifest to every Maven publication, beside the jar. It works with or without the version plugin, and generatePluginManifest writes it without publishing.
  • Read from your descriptor: name, api-version, dependencies and Folia support come from plugin.yml or paper-plugin.yml, including the ones plugin-yml generates. pluginManifest { } adds what those files can't say: the Minecraft range, dependency versions, platforms and extra fields.
  • Dependency links: modrinth(), spigot() and hangar() shortcuts and plain link() addresses. A malformed id or a non-http address fails the build.
  • Versioned format: the manifest carries a schema number, so readers can tell a format they don't know.
  • Cacheable and compatible with the configuration cache.

See the Readme for every field.

Full changelog: v2.0.0...v2.1.0