Skip to content

Commit 1037cdf

Browse files
committed
feat: use allay gradle plugin
1 parent 0800743 commit 1037cdf

File tree

3 files changed

+19
-24
lines changed

3 files changed

+19
-24
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ cd JavaPluginTemplate
2424
3. **Change Plugin Information**
2525

2626
- Rename package name from `org.allaymc.javaplugintemplate` to `your.group.name.and.pluginname`
27-
- Edit [build.gradle.kts](build.gradle.kts) and [settings.gradle.kts](settings.gradle.kts)
28-
- Update API version in [build.gradle.kts](build.gradle.kts) to the latest version (see TODO).
29-
You can find the latest version here: https://central.sonatype.com/artifact/org.allaymc.allay/api
30-
- Edit [plugin.json](src/main/resources/plugin.json)
27+
- Update [build.gradle.kts](build.gradle.kts) and [settings.gradle.kts](settings.gradle.kts)
3128
- Reload gradle
3229

3330
4. **Build and Run Your Plugin**

build.gradle.kts

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2-
31
plugins {
42
id("java-library")
5-
id("com.gradleup.shadow") version "9.2.2"
3+
id("org.allaymc.gradle.plugin") version "0.1.1"
64
}
75

8-
// TODO: Update the group to yours
9-
group = "org.allaymc"
6+
// TODO: Update the group to yours (should be same to the package of the plugin main class)
7+
group = "org.allaymc.javaplugintemplate"
108
// TODO: Update the description to yours
119
description = "Java plugin template for allay server"
1210
version = "0.1.0"
@@ -17,18 +15,24 @@ java {
1715
}
1816
}
1917

20-
repositories {
21-
mavenCentral()
18+
// See also https://github.com/AllayMC/AllayGradle
19+
allay {
20+
// TODO: Update the api version to the latest
21+
// You can find the latest version here: https://central.sonatype.com/artifact/org.allaymc.allay/api
22+
api = "0.16.0"
23+
24+
plugin {
25+
// TODO: Update the entrance when you change your plugin main class
26+
// Same to `org.allaymc.javaplugintemplate.JavaPluginTemplate`
27+
entrance = ".JavaPluginTemplate"
28+
// TODO: Use your handsome name here
29+
authors += "YourNameHere"
30+
// TODO: Update the website to yours
31+
website = "https://github.com/AllayMC/JavaPluginTemplate"
32+
}
2233
}
2334

2435
dependencies {
25-
// TODO: Update the version of api to the latest
26-
compileOnly(group = "org.allaymc.allay", name = "api", version = "0.12.0")
2736
compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.34")
28-
2937
annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.34")
3038
}
31-
32-
tasks.shadowJar {
33-
archiveFileName = "${project.name}-${version}-shaded.jar"
34-
}

src/main/resources/plugin.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)