@@ -7,91 +7,148 @@ plugins {
77 id(" xyz.jpenilla.run-paper" ) version " 1.0.6"
88}
99
10- group = " com.eternalcode.formatter"
11- version = " 1.0.0"
12-
13- repositories {
14- gradlePluginPortal()
15- mavenCentral()
16- maven { url = uri(" https://hub.spigotmc.org/nexus/content/repositories/snapshots/" ) }
17- maven { url = uri(" https://repo.panda-lang.org/releases" ) }
18- maven { url = uri(" https://papermc.io/repo/repository/maven-public/" ) }
19- maven { url = uri(" https://repo.extendedclip.com/content/repositories/placeholderapi/" ) }
20- maven { url = uri(" https://jitpack.io" ) }
10+ subprojects {
11+ repositories {
12+ gradlePluginPortal()
13+ mavenCentral()
14+ mavenLocal()
15+ maven { url = uri(" https://hub.spigotmc.org/nexus/content/repositories/snapshots/" ) }
16+ maven { url = uri(" https://repo.panda-lang.org/releases" ) }
17+ maven { url = uri(" https://papermc.io/repo/repository/maven-public/" ) }
18+ maven { url = uri(" https://repo.extendedclip.com/content/repositories/placeholderapi/" ) }
19+ maven { url = uri(" https://jitpack.io" ) }
20+ }
21+
22+ group = " com.eternalcode.formatter"
23+ version = " 1.0.0"
24+
25+ apply (plugin = " java-library" )
26+ apply (plugin = " com.github.johnrengelman.shadow" )
27+
28+ java {
29+ sourceCompatibility = JavaVersion .VERSION_17
30+ targetCompatibility = JavaVersion .VERSION_17
31+ }
32+
33+ sourceSets.main.get().java.setSrcDirs(listOf (" src/" ))
34+
35+ tasks.withType<JavaCompile > {
36+ options.encoding = " UTF-8"
37+ }
2138}
2239
23- dependencies {
24- // spigot api
25- compileOnly(" org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT" )
40+ project(" :chat-formatter" ) {
41+ apply (plugin = " net.minecrell.plugin-yml.bukkit" )
42+ apply (plugin = " xyz.jpenilla.run-paper" )
43+
44+ bukkit {
45+ main = " com.eternalcode.formatter.ChatFormatterPlugin"
46+ apiVersion = " 1.13"
47+ prefix = " ChatFormatter"
48+ author = " EternalCodeTeam"
49+ name = " ChatFormatter"
50+ version = " ${project.version} "
51+ depend = listOf (" PlaceholderAPI" , " Vault" )
52+ }
2653
27- // Kyori
28- implementation( " net.kyori:adventure-platform-bukkit:4.1.0 " )
29- implementation( " net.kyori:adventure-text-minimessage:4.10.1 " )
54+ dependencies {
55+ // Spigot API
56+ compileOnly( " org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT " )
3057
31- // LiteCommands
32- implementation(" dev.rollczi.litecommands:bukkit:1.9.2" )
58+ // Kyori Adventure & MiniMessage
59+ implementation(" net.kyori:adventure-platform-bukkit:4.1.0" )
60+ implementation(" net.kyori:adventure-text-minimessage:4.11.0" )
3361
34- // cdn configs
35- implementation(" net.dzikoysk:cdn:1.13.22" )
62+ // LiteCommands & CDN
63+ implementation(" dev.rollczi.litecommands:bukkit:2.0.5" )
64+ implementation(" net.dzikoysk:cdn:1.13.22" )
3665
37- // bStats
38- implementation(" org.bstats:bstats-bukkit:3.0.0" )
66+ // bStats
67+ implementation(" org.bstats:bstats-bukkit:3.0.0" )
3968
40- // placeholderapi
41- compileOnly(" me.clip:placeholderapi:2.11.1" )
42- compileOnly(" com.github.MilkBowl:VaultAPI:1.7" )
69+ // PlaceholderAPI & Vault
70+ compileOnly(" me.clip:placeholderapi:2.11.1" )
71+ compileOnly(" com.github.MilkBowl:VaultAPI:1.7" )
72+ }
4373
44- // test
45- testImplementation(" org.junit.jupiter:junit-jupiter-api:5.8.2" )
46- testImplementation(" org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT" )
47- testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine:5.8.2" )
48- }
74+ tasks.withType <ShadowJar > {
75+ archiveFileName.set(" ChatFormatter v${project.version} .jar" )
4976
77+ exclude(" org/intellij/lang/annotations/**" )
78+ exclude(" org/jetbrains/annotations/**" )
79+ exclude(" META-INF/**" )
80+ exclude(" javax/**" )
5081
51- java {
52- sourceCompatibility = JavaVersion .VERSION_17
53- targetCompatibility = JavaVersion .VERSION_17
54- }
82+ mergeServiceFiles()
83+ minimize()
5584
56- tasks.withType<JavaCompile > {
57- options.encoding = " UTF-8"
58- }
85+ relocate(" net.dzikoysk" , " com.eternalcode.formatter.libs.net.dzikoysk" )
86+ relocate(" dev.rollczi" , " com.eternalcode.formatter.libs.dev.rollczi" )
87+ relocate(" panda" , " com.eternalcode.formatter.libs.org.panda" )
88+ relocate(" org.panda_lang" , " com.eternalcode.formatter.libs.org.panda" )
89+ relocate(" net.kyori" , " com.eternalcode.formatter.libs.net.kyori" )
90+ relocate(" org.bstats" , " com.eternalcode.formatter.libs.org.bstats" )
91+ }
5992
60- bukkit {
61- main = " com.eternalcode.formatter.ChatFormatterPlugin"
62- apiVersion = " 1.13"
63- prefix = " ChatFormatter"
64- author = " EternalCodeTeam"
65- name = " ChatFormatter"
66- version = " ${project.version} "
67- depend = listOf (" PlaceholderAPI" , " Vault" )
93+ tasks {
94+ runServer {
95+ minecraftVersion(" 1.18.2" )
96+ }
97+ }
6898}
6999
70- tasks {
71- runServer {
72- minecraftVersion(" 1.18.2" )
100+ project(" :paper-support" ) {
101+ apply (plugin = " net.minecrell.plugin-yml.bukkit" )
102+ apply (plugin = " xyz.jpenilla.run-paper" )
103+
104+ bukkit {
105+ main = " com.eternalcode.formatter.paper.ChatFormatterPaperSupportPlugin"
106+ apiVersion = " 1.13"
107+ prefix = " ChatFormatter-PaperSupport"
108+ author = " EternalCodeTeam"
109+ name = " ChatFormatter-PaperSupport"
110+ version = " ${project.version} "
111+ depend = listOf (" ChatFormatter" )
73112 }
74- }
75113
76- tasks.withType <ShadowJar > {
77- archiveFileName.set(" ChatFormatter v${project.version} .jar" )
114+ dependencies {
115+ compileOnly(project(" :chat-formatter" ))
116+ compileOnly(" io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT" )
117+ }
118+
119+ tasks.withType <ShadowJar > {
120+ archiveFileName.set(" ChatFormatter-PaperSupport v${project.version} .jar" )
78121
79- exclude(" org/intellij/lang/annotations/**" )
80- exclude(" org/jetbrains/annotations/**" )
81- exclude(" META-INF/**" )
82- exclude(" javax/**" )
122+ exclude(" org/intellij/lang/annotations/**" )
123+ exclude(" org/jetbrains/annotations/**" )
124+ exclude(" META-INF/**" )
125+ exclude(" javax/**" )
83126
84- mergeServiceFiles()
85- minimize()
127+ mergeServiceFiles()
128+ minimize()
129+ }
86130
87- relocate(" net.dzikoysk" , " com.eternalcode.formatter.libs.net.dzikoysk" )
88- relocate(" dev.rollczi" , " com.eternalcode.formatter.libs.dev.rollczi" )
89- relocate(" panda" , " com.eternalcode.formatter.libs.org.panda" )
90- relocate(" org.panda_lang" , " com.eternalcode.formatter.libs.org.panda" )
91- relocate(" net.kyori" , " com.eternalcode.formatter.libs.net.kyori" )
92- relocate(" org.bstats" , " com.eternalcode.formatter.libs.org.bstats" )
131+ tasks {
132+ runServer {
133+ minecraftVersion(" 1.18.2" )
134+ }
135+ }
93136}
94137
95- tasks.getByName<Test >(" test" ) {
96- useJUnitPlatform()
138+ project(" :chat-formatter-test" ) {
139+ sourceSets.main.get().java.setSrcDirs(listOf (" none/" ))
140+ sourceSets.test.get().java.setSrcDirs(listOf (" src/" ))
141+
142+ dependencies {
143+ testImplementation(project(" :chat-formatter" ))
144+
145+ testImplementation(" net.dzikoysk:cdn:1.13.22" )
146+ testImplementation(" org.junit.jupiter:junit-jupiter-api:5.8.2" )
147+ testImplementation(" org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT" )
148+ testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine:5.8.2" )
149+ }
150+
151+ tasks.getByName<Test >(" test" ) {
152+ useJUnitPlatform()
153+ }
97154}
0 commit comments