Skip to content

Releases: EndlessCodeGroup/BukkitGradle

v1.0.0

18 Apr 19:04
2cd9959
Compare
Choose a tag to compare

Pivot!

After a 4-year hiatus in releases, the plugin landscape has evolved significantly.
jpenilla's excellent plugins run-task and resource-factory have been released,
and they're perfect for running Paper servers and generating plugin.yml.

Rather than maintaining our own implementations, BukkitGradle now leverages jpenilla's work, allowing us to:

  1. Reduce maintenance burden: By delegating core functionality to actively maintained projects
  2. Focus on innovation: Instead of reinventing the wheel, we can add new features

The main goal of BukkitGradle is now to provide nice defaults and a unified API
that simplifies plugin development by seamlessly integrating these plugins.

Features

  • Breaking change!
    Use jpenilla/run-task plugin and integrate run-paper for server execution,
    improving maintainability and compatibility with various server versions.
    • Remove bukkit.server.coreType property.
      Spigot is not supported anymore, PaperMC is the only supported server.
      If you need to run other server cores,
      please file an issue.
  • Breaking change!
    Use jpenilla/resource-factory under the hood to generate plugin.yml.
    This change enables full configuration of plugin.yml from a build script, but it comes with some renaming:
    • Configuration block bukkit.meta { ... } -> bukkit.plugin { ... }
    • Property bukkit.plugin.url -> bukkit.plugin.website
    • Task :parsePluginMetaFile -> :parsePluginYaml
    • Task :mergePluginMeta has been dropped. Use :mainResourceFactory instead
    • Package ru.endlesscode.bukkitgradle.meta -> ru.endlesscode.bukkitgradle.plugin
  • Breaking change! Don't add repositories implicitly.
    It was impossible to opt out from automatic repositories adding.
    From now, repositories should be added manually. For example:
    repositories {
        mavenCentral()
        papermc()
    }
  • Breaking change!
    Don't set default bukkit.apiVersion.
    It was implicitly set to 1.16.4 for the sake of simplicity, but in fact it was unobvious behavior.
    Now, bukkit.apiVersion should be set explicitly:
    bukkit {
        apiVersion = "1.20.5"
    }
  • Support setting "api-version" containing a patch version for v1.20.5+
  • Add dependency substitution rules fixing paper groupId and substituting bukkit version.
    In version catalogs placeholder value {bukkit.version} can be used, and it will be replaced with the actual version:
    [libraries]
    paperApi = { module = "io.papermc.paper:paper-api", version = "{bukkit.apiVersion}" }
  • Set the default JVM toolchain version
    instead of setting JVM target and source compatibility to 1.8.
    By default, the minimal supported JVM version compatible with the specified bukkit.apiVersion is used.
  • Accept EULA using CLI parameter -Dcom.mojang.eula.agree=true instead of changing eula.txt

Changed

  • Change the default value of bukkit.server.debug to false.
    It is recommended to use IDE facilities to run server with enabled debugging.
  • Change API for disabling plugin.yml generation:
    -bukkit.disableMetaGeneration()
    +bukkit.generatePluginYaml.set(false)
  • Use lazy API for bukkit.apiVersion property.

Fixed

  • Fix PaperMC repository URL
  • Fix group ID for PaperMC 1.17+
  • Fix compatibility with new versions of Shadow plugin

Housekeeping

  • Target JVM 1.8 → 17
  • Gradle 7.2 → 8.13
  • Remove old deprecated APIs

Full Changelog: 0.10.1...1.0.0

v0.10.1

07 Nov 10:45
8ab3db4
Compare
Choose a tag to compare

Added

  • Plugin meta now supports field libraries.

Housekeeping

  • Gradle 7.1.1 -> 7.2

Full Changelog: 0.10.0...0.10.1

v0.10.0

30 Jul 06:58
462d6dd
Compare
Choose a tag to compare

Added

Changed

  • JCenter replaced with MavenCentral
  • Improved compatibility with Groovy
  • Removed usages of deprecated APIs

Fixed

  • Add duplicate strategy to processResources (#58)
  • Fix spigot core copying (#55)

v0.9.2

24 Jan 22:26
d769b7c
Compare
Choose a tag to compare

Fixed

  • Fixed task copyPlugins when shadow plugin is enabled

v0.9.1

16 Jan 14:14
1355c75
Compare
Choose a tag to compare

Added

  • codemc() repository extension

Changed

  • BREAKING CHANGE: bukkit dependency extension renamed to bukkitApi.
    This name is more consistent, also it avoids conflict with BukkitExtension extension name.

v0.9.0 - Rework

07 Jan 21:21
70875cc
Compare
Choose a tag to compare

Reworked tasks hierarchy

All plugin's tasks reworked to use actual Gradle APIs:

Property syntax to configure meta fields

Use .set instead of =:

bukkit {
    meta {
-        desctiption = "My plugin's description"
+        description.set("My plugin's description")
    }
}

Improved Bukkit version management

Field bukkit.version is deprecated now, you should use bukkit.apiVersion instead.
Also, you can specify a version for dev server different from apiVersion:

bukkit {
    apiVersion = "1.16.4"
    server {
        version = "1.15.2" // Want to test plugin on older minecraft version 
    }
}

If bukkit.server.version is not specified, will be used bukkit.apiVersion for server.

Now, BukkitGradle adds api-version field to plugin.yml.
It will be parsed from bukkit.apiVersion but you can override it with bukkit.meta.apiVersion if need:

bukkit {
    apiVersion = "1.16.4" // Inferred api-version is 1.16
    
    meta {
        apiVersion.set("1.13") // But here you can override it
    }
}

Smarter plugin.yml generation

BukkitGradle will not "eat" your existing plugin.yml file.
Its content will be used if you've not configured bukkit.meta in BukkitGradle.

If you don't want plugin.yml generation at all, you can disable it:

bukkit {
    disableMetaGeneration()
}

Re-written in Kotlin

The plugin has been converted to Kotlin to make support easier.
The plugin still can be configured with Groovy DSL but
now it is friendly to Kotlin DSL.

Removed

  • Removed task :rebuildServerCore, use :buildServerCore --rerun-tasks instead
  • Removed extension DependencyHandler.craftbukkit(), use DependencyHandler.spigot() instead
  • Removed automatic mavenLocal() apply, you should apply it manually if you need it
  • Removed repository extension RepositoryHandler.vault(), use RepositoryHandler.jitpack() instead and read VaultAPI README

Changed

  • bukkit.run renamed to bukkit.server. The old name is deprecated
  • Add nogui argument by default to bukkitArgs
  • Type of properties server.jvmArgs and server.bukkitArgs changed from String to List<String>.
    It makes it easier to add arguments without overriding defaults
  • Default main class pattern changed from <groupId>.<lowercased name>.<name> to <groupId>.<name>

Housekeeping

  • Default bukkit version now is 1.16.4
  • Update Gradle to 6.7.1

v0.8.2 - Gradle 5.0

12 Apr 00:06
815ecb9
Compare
Choose a tag to compare

Dropped support of Gradle lower than 5.0

Fixed

  • Exception when server's folder doesn't exists
  • Failure of downloading bukkit or paper meta will not fail build
  • Version selection for paper core (it always was 1.12.2)

v0.8.1 - Aikar's repo

21 Aug 21:13
Compare
Choose a tag to compare
v0.8.1 - Aikar's repo Pre-release
Pre-release

Added

  • Function for Aikar's repository: aikar()

Fixed

  • Fixed NPE when jar artifact hasn't classifier.
  • Fixed ArrayStoreException (thanks to @gfiedler)

v0.8.0 - Paper support

14 May 14:48
Compare
Choose a tag to compare
Pre-release

Paper

Now you can choose bukkit.run.core. It can be spigot or paper.
Also added task :downloadPaperclip to download paperclip (wow! unexpected).
To host paper versions build was created this gist.
Added function paperApi() to include Paper as dependency.

Other

  • Automatically BuildTools download and update
  • Dependencies applies repos that needed for them

Read updated README for more information.

v0.7.1 - Local Properties

13 May 17:38
Compare
Choose a tag to compare
Pre-release

Support of local environment

BREAKING CHANGES: Properties bukkit.buildtools and bukkit.run.dir was removed.

Now you can define it in local.properties file (that was automatically created in project root on refresh):

# Absolute path to directory that contains BuildTools.jar
buildtools.dir=/path/to/buildtools/
# Absolute path to dev server
server.dir=/path/to/buildtools/

Or you can define it globally (for all projects that uses BukkitGradle) with environment variables
BUKKIT_DEV_SERVER_HOME and BUILDTOOLS_HOME.

For plugin meta added q and qq functions

These functions was added after this issue: #13
Usage:

meta {
    name = qq "double quoted value" // Will be - name: "double quoted value"
    description = q "single quoted value" // Will be - description: `single quoted value`
}

Note: In Groovy you can use functions with two ways: normal - q("value") and without braces - q "value"

Fixed

NPE on PrepareServer