Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dependency issues #38

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ java {

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

compileOnly 'me.clip:placeholderapi:2.11.2'
compileOnly "net.kyori:adventure-text-serializer-legacy:4.15.0"
compileOnly "net.kyori:adventure-text-serializer-plain:4.15.0"
compileOnly "net.kyori:adventure-text-minimessage:4.15.0"
compileOnly 'com.palmergames.bukkit.towny:towny:0.100.0.0'
compileOnly "org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT"
compileOnly 'com.github.LeonMangler:SuperVanish:6.2.17'
Expand Down Expand Up @@ -107,6 +107,7 @@ shadowJar {
relocate 'com.github.stefvanschie.inventoryframework', 'com.cyr1en.inventoryframework'
relocate 'net.wesjd.anvilgui', 'com.cyr1en.anvilgui'
relocate 'io.github.rapha149.signgui', 'com.cyr1en.signgui'
relocate 'net.kyori.adventure.text.minimessage', 'com.cyr1en.minimessage'
relocate 'dev.jorel.commandapi', 'com.cyr1en.commandapi'
relocate 'org.fusesource.jansi', 'com.cyr1en.jansi'
relocate 'org.bstats', 'com.cyr1en.bstats'
Expand All @@ -126,6 +127,11 @@ tasks.register("lightJar", ShadowJar) {
exclude(dependency('com.mojang:brigadier'))
exclude(dependency('com.github.stefvanschie.inventoryframework:IF'))
exclude(dependency('me.lucko:jar-relocator'))
exclude(dependency('net.kyori:adventure-text-minimessage'))
exclude(dependency('net.kyori:adventure-api'))
exclude(dependency('net.kyori:adventure-key'))
exclude(dependency('net.kyori:examination-api'))
exclude(dependency('net.kyori:examination-string'))
exclude(dependency('org.ow2.asm:asm'))
exclude(dependency('org.ow2.asm:asm-commons'))
exclude(dependency('org.ow2.asm:asm-tree'))
Expand All @@ -136,6 +142,7 @@ tasks.register("lightJar", ShadowJar) {
relocate 'com.github.stefvanschie.inventoryframework', 'com.cyr1en.inventoryframework'
relocate 'net.wesjd.anvilgui', 'com.cyr1en.anvilgui'
relocate 'io.github.rapha149.signgui', 'com.cyr1en.signgui'
relocate 'net.kyori.adventure.text.minimessage', 'com.cyr1en.minimessage'
relocate 'org.fusesource.jansi', 'com.cyr1en.jansi'
relocate 'dev.jorel.commandapi', 'com.cyr1en.commandapi'
relocate 'org.bstats', 'com.cyr1en.bstats'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
/**
* Represents a core dependency for the plugin.
* This dependency is required for the plugin to work.
*
*
* <p>
* These type of dependencies must be available in the classpath by the time the
* plugin is loaded.
* if they're not present in the classpath, the plugin will try to download them
* and attempt to load them.
*
*
* <p>
* These should not have any relocations and must stay as is.
*/
Expand All @@ -32,7 +32,22 @@ public enum CoreDependency {
"gson-2.10.1.jar",
"https://repo1.maven.org/maven2/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar",
"b3add478d4382b78ea20b1671390a858002feb6c",
"com.google.gson.JsonParser");
"com.google.gson.JsonParser"),
ADVENTURE_API(
"adventure-api-4.15.0.jar",
"https://repo.maven.apache.org/maven2/net/kyori/adventure-api/4.15.0/adventure-api-4.15.0.jar",
"84e507c4cf17404299078435736e7e752dde8bae",
"net.kyori.adventure.text.serializer.ComponentSerializer"),
ADVENTURE_KEY(
"adventure-key-4.16.0.jar",
"https://repo.maven.apache.org/maven2/net/kyori/adventure-key/4.16.0/adventure-key-4.16.0.jar",
"b695c40a7d2fd658246de78ea428e8f8dc7ffd2d",
"net.kyori.adventure.key.InvalidKeyException"),
EXAMINATION_API(
"examination-api-1.3.0.jar",
"https://repo.maven.apache.org/maven2/net/kyori/examination-api/1.3.0/examination-api-1.3.0.jar",
"8a2d185275307f1e2ef2adf7152b9a0d1d44c30b",
"net.kyori.examination.Examinable");

private final String fileName;
private final String url;
Expand All @@ -49,7 +64,7 @@ public enum CoreDependency {
}

public Dependency asDependency() {
return new Dependency(fileName, url, new String[] { "", "" }, sha1);
return new Dependency(fileName, url, new String[]{"", ""}, sha1);
}

public boolean inClassPath() {
Expand Down