diff --git a/bungee/src/main/resources/bungee.yml b/bungee/src/main/resources/bungee.yml index 4136c21f..2ef81d5f 100644 --- a/bungee/src/main/resources/bungee.yml +++ b/bungee/src/main/resources/bungee.yml @@ -5,6 +5,4 @@ softDepends: - VK-API - JavaTelegramBotApi - NanoLimboBungee -author: bivashy, MasterCapeXD -libraries: - - com.github.ben-manes.caffeine:caffeine:3.1.7 \ No newline at end of file +author: bivashy, MasterCapeXD \ No newline at end of file diff --git a/core/pom.xml b/core/pom.xml index 18d15682..98a945d2 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -124,7 +124,6 @@ com.github.ben-manes.caffeine caffeine - 3.1.7 provided diff --git a/core/src/main/java/me/mastercapexd/auth/management/BaseLibraryManagement.java b/core/src/main/java/me/mastercapexd/auth/management/BaseLibraryManagement.java index 2e1cb01d..a8e76276 100644 --- a/core/src/main/java/me/mastercapexd/auth/management/BaseLibraryManagement.java +++ b/core/src/main/java/me/mastercapexd/auth/management/BaseLibraryManagement.java @@ -1,7 +1,7 @@ package me.mastercapexd.auth.management; import java.util.ArrayList; -import java.util.Collection; +import java.util.Collections; import java.util.List; import com.alessiodp.libby.Library; @@ -11,6 +11,7 @@ public class BaseLibraryManagement implements LibraryManagement { private static final String JDA_VERSION = "5.0.0-beta.20"; + private static final String CAFFEINE_VERSION = "3.1.8"; public static final Library JDA_LIBRARY = Library.builder() .groupId("net{}dv8tion") .artifactId("JDA") @@ -27,8 +28,17 @@ public class BaseLibraryManagement implements LibraryManagement { .resolveTransitiveDependencies(true) .excludeTransitiveDependency("club{}minnced", "opus-java") .build(); + public static final Library CAFFEINE_LIBRARY = Library.builder() + .groupId("com{}github{}ben-manes{}caffeine") + .artifactId("caffeine") + .relocate("com{}github{}benmanes{}caffeine", "com{}bivashy{}auth{}lib{}com{}github{}benmanes{}caffeine") + .version(CAFFEINE_VERSION) + .resolveTransitiveDependencies(true) + .build(); private final List customRepositories = new ArrayList<>(); - private final List customLibraries = new ArrayList<>(); + private final List customLibraries = new ArrayList<>(Collections.singletonList( + CAFFEINE_LIBRARY + )); private final LibraryManager libraryManager; public BaseLibraryManagement(LibraryManager libraryManager) { @@ -42,9 +52,7 @@ public void loadLibraries() { libraryManager.addMavenCentral(); libraryManager.addJitPack(); - Collection libraries = new ArrayList<>(customLibraries); - - libraries.forEach(libraryManager::loadLibrary); + customLibraries.forEach(libraryManager::loadLibrary); } @Override diff --git a/pom.xml b/pom.xml index 152c4990..cde6f1b5 100644 --- a/pom.xml +++ b/pom.xml @@ -65,6 +65,7 @@ 1.3 2.0.0-SNAPSHOT 1.0.8 + 3.1.8 3.12.1 @@ -327,6 +328,11 @@ api ${nanolimbo.version} + + com.github.ben-manes.caffeine + caffeine + ${caffeine.version} + @@ -467,6 +473,10 @@ com.grack.nanojson ${dependencies.relocation.package}.com.grack.nanojson + + com.github.benmanes.caffeine + ${dependencies.relocation.package}.com.github.benmanes.caffeine +