Skip to content

Commit 56dacc2

Browse files
authored
Merge pull request #38 from CyR1en/development
fix dependency issues
2 parents 697965e + d6bd67f commit 56dacc2

2 files changed

Lines changed: 28 additions & 6 deletions

File tree

build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ java {
3939

4040
PluginManifest pluginManifest = [
4141
name : 'CommandPrompter',
42-
version : new Version(major: 2, minor: 8, patch: 0, fix: 0, classifier: 'SNAPSHOT'),
42+
version : new Version(major: 2, minor: 8, patch: 1, fix: 0, classifier: 'SNAPSHOT'),
4343
author : 'CyR1en',
4444
description: 'Perfect companion plugin for inventory UI menu.',
4545
entry : 'com.cyr1en.commandprompter.CommandPrompter'
@@ -73,11 +73,11 @@ dependencies {
7373
// Exclude these
7474
implementation 'me.lucko:jar-relocator:1.7'
7575
implementation 'com.github.stefvanschie.inventoryframework:IF:0.10.11'
76+
implementation "net.kyori:adventure-text-minimessage:4.15.0"
7677

7778
compileOnly 'me.clip:placeholderapi:2.11.2'
7879
compileOnly "net.kyori:adventure-text-serializer-legacy:4.15.0"
7980
compileOnly "net.kyori:adventure-text-serializer-plain:4.15.0"
80-
compileOnly "net.kyori:adventure-text-minimessage:4.15.0"
8181
compileOnly 'com.palmergames.bukkit.towny:towny:0.100.0.0'
8282
compileOnly "org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT"
8383
compileOnly 'com.github.LeonMangler:SuperVanish:6.2.17'
@@ -107,6 +107,7 @@ shadowJar {
107107
relocate 'com.github.stefvanschie.inventoryframework', 'com.cyr1en.inventoryframework'
108108
relocate 'net.wesjd.anvilgui', 'com.cyr1en.anvilgui'
109109
relocate 'io.github.rapha149.signgui', 'com.cyr1en.signgui'
110+
relocate 'net.kyori.adventure.text.minimessage', 'com.cyr1en.minimessage'
110111
relocate 'dev.jorel.commandapi', 'com.cyr1en.commandapi'
111112
relocate 'org.fusesource.jansi', 'com.cyr1en.jansi'
112113
relocate 'org.bstats', 'com.cyr1en.bstats'
@@ -126,6 +127,11 @@ tasks.register("lightJar", ShadowJar) {
126127
exclude(dependency('com.mojang:brigadier'))
127128
exclude(dependency('com.github.stefvanschie.inventoryframework:IF'))
128129
exclude(dependency('me.lucko:jar-relocator'))
130+
exclude(dependency('net.kyori:adventure-text-minimessage'))
131+
exclude(dependency('net.kyori:adventure-api'))
132+
exclude(dependency('net.kyori:adventure-key'))
133+
exclude(dependency('net.kyori:examination-api'))
134+
exclude(dependency('net.kyori:examination-string'))
129135
exclude(dependency('org.ow2.asm:asm'))
130136
exclude(dependency('org.ow2.asm:asm-commons'))
131137
exclude(dependency('org.ow2.asm:asm-tree'))
@@ -136,6 +142,7 @@ tasks.register("lightJar", ShadowJar) {
136142
relocate 'com.github.stefvanschie.inventoryframework', 'com.cyr1en.inventoryframework'
137143
relocate 'net.wesjd.anvilgui', 'com.cyr1en.anvilgui'
138144
relocate 'io.github.rapha149.signgui', 'com.cyr1en.signgui'
145+
relocate 'net.kyori.adventure.text.minimessage', 'com.cyr1en.minimessage'
139146
relocate 'org.fusesource.jansi', 'com.cyr1en.jansi'
140147
relocate 'dev.jorel.commandapi', 'com.cyr1en.commandapi'
141148
relocate 'org.bstats', 'com.cyr1en.bstats'

src/main/java/com/cyr1en/commandprompter/dependencies/CoreDependency.java

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
/**
88
* Represents a core dependency for the plugin.
99
* This dependency is required for the plugin to work.
10-
*
10+
*
1111
* <p>
1212
* These type of dependencies must be available in the classpath by the time the
1313
* plugin is loaded.
1414
* if they're not present in the classpath, the plugin will try to download them
1515
* and attempt to load them.
16-
*
16+
*
1717
* <p>
1818
* These should not have any relocations and must stay as is.
1919
*/
@@ -32,7 +32,22 @@ public enum CoreDependency {
3232
"gson-2.10.1.jar",
3333
"https://repo1.maven.org/maven2/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar",
3434
"b3add478d4382b78ea20b1671390a858002feb6c",
35-
"com.google.gson.JsonParser");
35+
"com.google.gson.JsonParser"),
36+
ADVENTURE_API(
37+
"adventure-api-4.15.0.jar",
38+
"https://repo.maven.apache.org/maven2/net/kyori/adventure-api/4.15.0/adventure-api-4.15.0.jar",
39+
"84e507c4cf17404299078435736e7e752dde8bae",
40+
"net.kyori.adventure.text.serializer.ComponentSerializer"),
41+
ADVENTURE_KEY(
42+
"adventure-key-4.16.0.jar",
43+
"https://repo.maven.apache.org/maven2/net/kyori/adventure-key/4.16.0/adventure-key-4.16.0.jar",
44+
"b695c40a7d2fd658246de78ea428e8f8dc7ffd2d",
45+
"net.kyori.adventure.key.InvalidKeyException"),
46+
EXAMINATION_API(
47+
"examination-api-1.3.0.jar",
48+
"https://repo.maven.apache.org/maven2/net/kyori/examination-api/1.3.0/examination-api-1.3.0.jar",
49+
"8a2d185275307f1e2ef2adf7152b9a0d1d44c30b",
50+
"net.kyori.examination.Examinable");
3651

3752
private final String fileName;
3853
private final String url;
@@ -49,7 +64,7 @@ public enum CoreDependency {
4964
}
5065

5166
public Dependency asDependency() {
52-
return new Dependency(fileName, url, new String[] { "", "" }, sha1);
67+
return new Dependency(fileName, url, new String[]{"", ""}, sha1);
5368
}
5469

5570
public boolean inClassPath() {

0 commit comments

Comments
 (0)