BukkitGradle Versions Save

Gradle utilities for easier writing Bukkit plugins

0.10.1

2 years ago

Added

  • Plugin meta now supports field libraries.

Housekeeping

  • Gradle 7.1.1 -> 7.2

Full Changelog: https://github.com/EndlessCodeGroup/BukkitGradle/compare/0.10.0...0.10.1

0.10.0

2 years ago

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)

0.9.2

3 years ago

Fixed

  • Fixed task copyPlugins when shadow plugin is enabled

0.9.1

3 years ago

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.

0.9.0

3 years ago

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

0.8.2

5 years ago

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)

0.8.1

5 years ago

Added

  • Function for Aikar's repository: aikar()

Fixed

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

0.8.0

5 years ago

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.

0.7.1

5 years ago

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

0.7.0

6 years ago

Building server core

Using build tools instead of dowloading core from Yive's mirror. Now you should specify path to BuildTools in build script:

bukkit {
    buildtools = '/path/to/BuildTools.jar'
}

Also added tasks: :buildServerCore - Build server core only if it not contains in local maven repo :rebuildServerCore - Force rebuild server core

Support of others APIs

BREAKING CHANGES!

Now you should manually add api dependencies. Possible APIs:

dependencies {
    compileOnly spigot()
    compileOnly spigotApi()
    compileOnly bukkit()
    compileOnly craftbukkit()
}