@@ -32,7 +32,7 @@ Gradle utilities for easier writing Bukkit plugins.
3232
3333## Apply plugin
3434[ BukkitGradle on plugins.gradle.org] ( https://plugins.gradle.org/plugin/ru.endlesscode.bukkitgradle )
35- > ** NOTE :** Gradle 5.0 + required
35+ > ** Note :** Gradle 6.6 + required
3636
3737#### With new plugins mechanism
3838``` groovy
@@ -66,7 +66,7 @@ plugins {
6666}
6767
6868// Project information
69- group = "com.example"
69+ group = "com.example.myplugin "
7070description = "My first Bukkit plugin with Gradle"
7171version = "0.1"
7272
@@ -76,23 +76,27 @@ dependencies {
7676 // see section 'Dependencies' for more info
7777}
7878```
79- ` compileOnly ` - it's like provided scope in Maven. It means that this dependncy will not included to your final jar.
80- It's enough! Will be hooked latest version of Bukkit and automatically generated ` plugin.yml ` with next content:
79+ > ** Note:** ` compileOnly ` - it's like ` provided ` scope in Maven.
80+ It means that this dependency will not be included to your final jar.
81+
82+ It's enough!
83+ Will be hooked the latest version of Bukkit and automatically generated ` plugin.yml ` with next content:
8184``` yaml
8285name : MyPlugin
8386description : My first Bukkit plugin with Gradle
8487main : com.example.myplugin.MyPlugin
8588version : 0.1
89+ api-version : 1.16
8690` ` `
87- Main class build by pattern: ` <groupId>.<lower case name >.<name>`
91+ > **Note:** Main class built by following pattern: ` <groupId>.<name>`
8892
8993# ## Configuring plugin
9094You can configure attributes that will be placed to `plugin.yml` :
9195` ` ` groovy
9296// Override default configurations
9397bukkit {
94- // Version of API (if you will not set this property, will be used latest available )
95- version = "1.12 .2"
98+ // Version of API (if you will not set this property, will be used latest version at moment of BukkitGradle release )
99+ apiVersion = "1.15 .2"
96100
97101 // Attributes for plugin.yml
98102 meta {
@@ -106,39 +110,19 @@ bukkit {
106110}
107111` ` `
108112
109- Will be generated next `plugin.yml` file :
113+ Will be generated `plugin.yml` file :
110114` ` ` yaml
111115name: MyPlugin
112116description: My amazing plugin, that doing nothing
113117main: com.example.plugin.MyPlugin
114118version: 1.0
119+ api-version: 1.15
115120website: http://www.example.com
116121authors: [OsipXD, Contributors]
117122` ` `
118123
119- Also you can add custom (unsupported by BukkitGradle) attributes like a `depend` etc.
120- Just create `plugin.yml` file and put custom attributes into.
121-
122- # ### Quotes around values
123- In some cases you may need put meta value in quotes. For this you can use `q` and `qq` functions.
124-
125- For example, we have meta :
126- ` ` ` groovy
127- meta {
128- name.set(qq("Double Quoted Name"))
129- description.set(q("Single quoted description"))
130- url.set("http://without.quot.es/")
131- }
132- ` ` `
133-
134- And will be generated :
135- ` ` ` yaml
136- name: "Double Quoted Name"
137- description: 'Single quoted description'
138- website: http://without.quot.es/
139- ` ` `
140-
141- **Note:** In Groovy you can use functions in two ways: normal - `q("value")` and without braces - `q "value"`
124+ If you want to add unsupported by BukkitGradle attributes, like a `depend`, `commands` etc.
125+ Create `plugin.yml` file and put custom attributes there.
142126
143127# ## Repositories and Dependencies
144128BukkitGradle provides short extension-functions to add common repositories and dependencies.
@@ -158,13 +142,13 @@ dependencies {
158142# #### Repositories:
159143 Name | Url
160144----------------|-------------------------------------------------------------------
161- spigot | https://hub.spigotmc.org/nexus/content/repositories/snapshots/
162- sk98q | http ://maven.sk89q.com/repo/
163- destroystokyo | https://repo.destroystokyo.com/ repository/maven-public/
164- dmulloy2 | http ://repo.dmulloy2.net/nexus/repository/public/
165- md5 | http ://repo.md-5.net/content/groups/public/
166- vault | http ://nexus.hc.to/content/repositories/pub_releases /
167- placeholderapi | http ://repo.extendedclip.com/content/repositories/placeholderapi/
145+ spigot | https://hub.spigotmc.org/nexus/content/repositories/snapshots/
146+ sk98q | https ://maven.sk89q.com/repo/
147+ papermc | https://papermc.io/repo/ repository/maven-public/
148+ dmulloy2 | https ://repo.dmulloy2.net/nexus/repository/public/
149+ md5 | https ://repo.md-5.net/content/groups/public/
150+ jitpack | https ://jitpack.io /
151+ placeholderapi | https ://repo.extendedclip.com/content/repositories/placeholderapi/
168152 aikar | https://repo.aikar.co/content/groups/aikar/
169153
170154# #### Dependencies:
@@ -198,17 +182,19 @@ buildtools.dir=/path/to/buildtools/
198182` ` `
199183If there no BuildTools.jar it will be automatically downloaded.
200184
201- **TIP:** you can define it globally (for all projects that uses BukkitGradle) with environment variables `BUKKIT_DEV_SERVER_HOME`
185+ > **Tip:** you can define it globally, for all projects that uses BukkitGradle.
186+ > Specify environment variables `BUKKIT_DEV_SERVER_HOME`
202187and `BUKKIT_BUILDTOOLS_HOME`.
203188
204189# #### On IntelliJ IDEA
205- Run `:buildIdeaRun` task. To your IDE will be added Run Configuration that will dynamically refreshes when you change
206- server configurations.
190+ Run `:buildIdeaRun` task.
191+ Run Configuration will be added to your IDE.
192+ It will be automatically refreshed when you change server configurations.
207193
208194
209195
210196# #### On other IDEs
211- Run `:startServer ` task.
197+ Run `:runServer ` task.
212198
213199# ### Dev server configuration
214200To accept EULA and change settings use `bukkit.server` section :
@@ -218,6 +204,8 @@ bukkit {
218204 server {
219205 // Core type. It can be 'spigot' or 'paper'
220206 core = "spigot"
207+ // Server version
208+ version = "1.16.4" // If not specified, apiVersion will be used
221209 // Accept EULA
222210 eula = false
223211 // Set online-mode flag
0 commit comments