{"id":13822060,"url":"https://github.com/EndlessCodeGroup/BukkitGradle","last_synced_at":"2025-05-16T15:32:31.348Z","repository":{"id":55120954,"uuid":"88301754","full_name":"EndlessCodeGroup/BukkitGradle","owner":"EndlessCodeGroup","description":"Gradle utilities for easier writing Bukkit plugins","archived":false,"fork":false,"pushed_at":"2021-11-07T10:45:14.000Z","size":799,"stargazers_count":36,"open_issues_count":7,"forks_count":3,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2024-06-28T03:38:10.882Z","etag":null,"topics":["bukkit","gradle","minecraft","paper","plugin","plugin-development","spigot"],"latest_commit_sha":null,"homepage":"https://plugins.gradle.org/plugin/ru.endlesscode.bukkitgradle","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EndlessCodeGroup.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-14T20:41:04.000Z","updated_at":"2022-12-06T21:42:38.000Z","dependencies_parsed_at":"2022-08-14T12:40:19.927Z","dependency_job_id":null,"html_url":"https://github.com/EndlessCodeGroup/BukkitGradle","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndlessCodeGroup%2FBukkitGradle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndlessCodeGroup%2FBukkitGradle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndlessCodeGroup%2FBukkitGradle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndlessCodeGroup%2FBukkitGradle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EndlessCodeGroup","download_url":"https://codeload.github.com/EndlessCodeGroup/BukkitGradle/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213893315,"owners_count":15653524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bukkit","gradle","minecraft","paper","plugin","plugin-development","spigot"],"created_at":"2024-08-04T08:01:40.877Z","updated_at":"2025-05-16T15:32:31.340Z","avatar_url":"https://github.com/EndlessCodeGroup.png","language":"Kotlin","readme":"BukkitGradle\n[![Version](https://img.shields.io/github/release/EndlessCodeGroup/BukkitGradle/all.svg?style=flat-square)](https://plugins.gradle.org/plugin/ru.endlesscode.bukkitgradle)\n[![license](https://img.shields.io/github/license/EndlessCodeGroup/BukkitGradle.svg?style=flat-square)](https://github.com/EndlessCodeGroup/BukkitGradle/blob/master/LICENSE)\n============\nGradle utilities to simplify Bukkit/Spigot plugins writing and debugging.\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Installation](#installation)\n  - [Quick Start](#quick-start)\n- [Configuration](#configuration)\n- [Repositories and Dependencies](#repositories-and-dependencies)\n- [Running Dev server](#running-dev-server)\n  - [Dev server configuration](#dev-server-configuration)\n- [Migration Guide](#migration-guide)\n  - [Upgrade from 0.10.x](#upgrade-from-010x)\n  - [Upgrade from 0.8.x](#upgrade-from-08x)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n#### Features\n\n- Sets up compiler encoding to UTF-8\n- Provides short extension functions to add common repositories and dependencies\n- Generates plugin.yml from Gradle project information\n- Allows running dev server from IDE\n- Runs server using [jpenilla/run-task]\n\n## Installation\n\n\u003e [!NOTE]\n\u003e BukkitGradle requires Gradle 8.0+ to run\n\n```kotlin\nplugins {\n    id(\"ru.endlesscode.bukkitgradle\") version \"1.0.0\"\n}\n```\n\n[BukkitGradle on plugins.gradle.org](https://plugins.gradle.org/plugin/ru.endlesscode.bukkitgradle)\n\n\u003cdetails\u003e\n\n\u003csummary\u003eUsing snapshots\u003c/summary\u003e\n\nTo use snapshots, add jitpack repository to the `settings.gradle.kts` and specify version `develop-SNAPSHOT`:\n\n```kotlin\n// settings.gradle\n\npluginManagement {\n    repositories {\n        gradlePluginPortal()\n        maven { setUrl(\"https://jitpack.io\") }\n    }\n}\n\nrootProject.name = \"\u003cyour project name\u003e\"\n```\n\n```kotlin\n// build.gradle\n\nplugins {\n    id(\"ru.endlesscode.bukkitgradle\") version \"develop-SNAPSHOT\"\n}\n```\n\n\u003c/details\u003e\n\n### Quick Start\n\nApply the plugin and configure project's `group`, `description` and `version`.\nThese values will be used to generate the `plugin.yml` file:\n\n```kotlin\nplugins {\n    id(\"ru.endlesscode.bukkitgradle\") version \"1.0.0\"\n}\n\ngroup = \"com.example.myplugin\"\ndescription = \"My first Bukkit plugin built with Gradle\"\nversion = \"0.1\"\n\nbukkit {\n    // Target API version. Will be used both for plugin.yml and for dependencies\n    apiVersion = \"1.21.5\"\n}\n\n// Add the necessary API to the project\ndependencies {\n    compileOnly(paperApi)\n    // See the 'Dependencies' section for more info\n}\n\nrepositories {\n    papermc()\n}\n```\n\nThat's it!\nDuring the plugin compilation `plugin.yml` will be generated with the following content:\n\n```yaml\napi-version: 1.21.5\nname: MyPlugin\nversion: '0.1'\nmain: com.example.myplugin.MyPlugin\ndescription: My first Bukkit plugin built with Gradle\n```\n\n\u003e [!NOTE]\n\u003e By default, main class is built by the following pattern: `\u003cgroupId\u003e.\u003cname\u003e`\n\nNext, you might need to [configure](#configuration) `plugin.yml` content or [run dev server](#running-dev-server).\n\n## Configuration\n\nThe `plugin.yml` content can be configured using `bukkit.plugin { ... }` block.\n\n```kotlin\nbukkit {\n    plugin {\n        name = \"MyPlugin\"\n        description = \"My amazing plugin\"\n        main = \"com.example.plugin.MyPlugin\"\n        version = \"1.0\"\n        authors = listOf(\"osipxd\", \"contributors\")\n        depend = listOf(\"Vault\", \"Mimic\")\n    }\n}\n```\n\n## Repositories and Dependencies\n\nBukkitGradle provides shortcuts to add common repositories and dependencies:\n\n```kotlin\nrepositories {\n    papermc()\n}\n\ndependencies {\n    compileOnly(paperApi)\n}\n```\n\n#### Repositories\n\n| Name             | Url                                                                |\n|------------------|--------------------------------------------------------------------|\n| `spigot`         | https://hub.spigotmc.org/nexus/content/repositories/snapshots/     |\n| `sk98q`          | https://maven.sk89q.com/repo/                                      |\n| `papermc`        | https://repo.papermc.io/repository/maven-public/                   |\n| `dmulloy2`       | https://repo.dmulloy2.net/nexus/repository/public/                 |\n| `md5`            | https://repo.md-5.net/content/groups/public/                       |\n| `jitpack`        | https://jitpack.io/                                                |\n| `placeholderapi` | https://repo.extendedclip.com/content/repositories/placeholderapi/ |\n| `aikar`          | https://repo.aikar.co/content/groups/aikar/                        |\n| `codemc`         | https://repo.codemc.org/repository/maven-public/                   |\n\n#### Dependencies\n\nWhen adding dependencies, make sure you've added the corresponding repository.\n\n| Name        | Signature                                | Official repository |\n|-------------|------------------------------------------|---------------------|\n| `spigot`    | `org.spigotmc:spigot:$apiVersion`        | `mavenLocal()`*     |\n| `spigotApi` | `org.spigotmc:spigot-api:$apiVersion`    | `spigot()`          |\n| `bukkitApi` | `org.bukkit:bukkit:$apiVersion`          | `mavenLocal()`**    |\n| `paperApi`  | `io.papermc.paper:paper-api:$apiVersion` | `papermc()`         |\n\n\\* Spigot is available in `mavenLocal()` only if you've built it locally using [Spigot BuildTools][buildtools]. \\\n\\*\\* Bukkit should be built locally. However, some versions are available in `spigot()` repository.  \\\n\\*\\*\\* `$apiVersion` - is `${version}-R0.1-SNAPSHOT` (where `$version` is `bukkit.apiVersion`).\n\nIf you need more shortcuts, [file an issue][issue].\n\n## Running Dev server\n\nThis plugin pre-configures [jpenilla/run-task] according to the specified [configuration](#dev-server-configuration).\nUse `:runServer` task to run the dev server:\n\n```bash\n./gradlew runServer\n```\n\n\u003e [!TIP]\n\u003e It is possible to create a run configuration for IDEA by running `:buildIdeaRun` task.\n\u003e The configuration will be stored in `\u003cprojectDir\u003e/.run` directory so it can be shared through VCS.\n\u003e The directory can be changed by configuring the `:buildIdeaRun` task:\n\u003e ```kotlin\n\u003e tasks.buildIdeaRun {\n\u003e     configurationsDir = file(\".idea/runConfigurations\")\n\u003e }\n\u003e ```\n\nBy default, the server will be located at `\u003cprojectDir\u003e/run` but you can change it by providing Gradle property `bukkitgradle.server.dir`:\n\n```properties\n# gradle.properties\nbukkitgradle.server.dir=build/run\n```\n\nAlternatively, you can configure `runServer` task:\n\n```kotlin\ntasks.runServer {\n    runDirectory.set(file(\"build/run\"))\n}\n```\n\n\u003e [!TIP]\n\u003e It is possible to configure a server directory shared between multiple projects.\n\u003e Set the `bukkitgradle.server.dir` property in `$HOME/.gradle/gradle.properties`.\n\u003e\n\u003e This file contains local configurations to be used for all Gradle projects.\n\u003e The value specified in project's `gradle.properties` takes precedence over the global one.\n\n### Dev server configuration\n\nUse `bukkit.server` section to accept EULA and configure the server:\n\n```groovy\nbukkit {\n    // INFO: Default values are used here\n    server {\n        // Server version\n        version = \"1.21.5\" // If not specified, bukkit.apiVersion will be used\n        // Accept EULA\n        eula = false\n        // Set online-mode flag\n        onlineMode = false\n        // Debug mode (listen to 5005 port)\n        debug = true\n        // Set default file encoding (flag -Dfile.encoding)\n        encoding = \"UTF-8\"\n        // JVM arguments\n        javaArgs(\"-Xmx1G\")\n        // Bukkit arguments\n        bukkitArgs()\n    }\n}\n```\n\n\u003e [!NOTE]\n\u003e `eula` and `online-mode` options specified in `bukkit.server` always take precedence over the values specified\n\u003e in `eula.txt` and `server.properties`\n\n## Migration Guide\n\n### Upgrade from 0.10.x\n\n1. Update Gradle to 8.0 or newer (the latest version is recommended):\n   ```shell\n   ./gradlew wrapper --gradle-version 8.13\n   ```\n\n2. Replace deprecated and removed APIs:\n   ```diff\n   bukkit {\n   -   meta {\n   +   plugin {\n           name = \"MyPlugin\"\n   -       url = \"https://example.com/\"\n   +       website = \"https://example.com/\"\n       }\n   }\n   ``` \n   \n3. Specify `bukkit.apiVersion` explicitly. Previously it was implicitly set to `1.16.4`:\n   ```kotlin\n   bukkit {\n       apiVersion = \"1.21.5\"\n   }\n   ```\n\n4. Remove server core selection: `bukkit.server.coreType` and `bukkit.server.setCore(...)`.\n   Paper is the only supported server core now.\n\n5. If you have `plugin.yml`, move it's content to `bukkit.plugin { ... }` block and delete the file.\n\n6. Explicitly add `mavenCentral()` to the repositories if you're using dependencies from it:\n   ```kotlin\n   repositories {\n       mavenCentral()\n   } \n   ```\n   Add repositories for Bukkit/Spigot/Paper according to the [dependency table](#dependencies).\n\n### Upgrade from 0.8.x\n\n1. Use `bukkit.apiVersion` instead of `bukkit.version`:\n   ```diff\n   bukkit {\n   -   version = \"1.16.4\"\n   +   apiVersion = \"1.16.4\"\n   }\n   ```\n2. Use `build.server` block instead of `build.run`:\n   ```diff\n   bukkit {\n   -   run {\n   +   server {\n           core = \"paper\"\n       }\n   }\n   ```\n3. Update arguments assignment syntax:\n   ```diff\n   bukkit {\n       server {\n   -       jvmArgs = \"-Xmx2G -Xms512M\"\n   +       jvmArgs = [\"-Xmx2G\", \"-Xms512M\"]\n   +       //or jvmArgs(\"-Xms512M\") if you don't want to override defaults\n       }\n   }\n   ```\n4. Replace removed APIs:\n   ```diff\n   repositories {\n   -   destroystokyo()\n   +   papermc()\n\n   -   vault()\n   +   jitpack()\n   }\n   \n   dependencies {\n   -   compileOnly(craftbikkit())\n   +   compileOnly(spigot())\n   }\n   ```\n5. Remove `q` and `qq` functions calls in `meta { ... }`\n6. Check generated plugin.yml contents after build.\n\nIf there are any problems, [create an issue][issue].\n\n## License\n\n[MIT](LICENSE) (c) 2020 EndlessCode Group\n\n[jpenilla/run-task]: https://github.com/jpenilla/run-task/\n[buildtools]: https://www.spigotmc.org/wiki/buildtools/\n[issue]: https://github.com/EndlessCodeGroup/BukkitGradle/issues/new\n","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEndlessCodeGroup%2FBukkitGradle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEndlessCodeGroup%2FBukkitGradle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEndlessCodeGroup%2FBukkitGradle/lists"}