diff --git a/build.gradle b/build.gradle index ace73830..50f150cc 100644 --- a/build.gradle +++ b/build.gradle @@ -94,7 +94,7 @@ subprojects { testRuntimeOnly(libs.jupiter.engine) // DynamicProxy - annotationProcessor(libs.dynamicproxy) + annotationProcessor(libs.dynamicproxy.api) } test { diff --git a/common/build.gradle b/common/build.gradle index 424b1d43..54d67710 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -71,10 +71,8 @@ dependencies { runtimeDownloadApi(libs.caffeine) // DynamicProxy - runtimeDownloadApi(libs.dynamicproxy) { - // Not needed at runtime - exclude module: 'javaparser-symbol-solver-core' - } + compileOnlyApi(libs.dynamicproxy.api) + runtimeDownloadApi(libs.dynamicproxy.runtime) // Jackson (transitive in :api) compileOnlyApi(libs.jackson.databind) @@ -96,10 +94,7 @@ dependencies { runtimeDownloadApi(libs.enhancedlegacytext) // Database - hikariOnly(libs.hikaricp) { - // Already provided - exclude group: 'org.slf4j' - } + hikariOnly(libs.hikaricp) h2DriverOnly(libs.h2) mysqlDriverOnly(libs.mysql) mariadbDriverOnly(libs.mariadb) diff --git a/common/src/main/java/com/discordsrv/common/storage/impl/sql/hikari/MariaDBStorage.java b/common/src/main/java/com/discordsrv/common/storage/impl/sql/hikari/MariaDBStorage.java index ad11d596..2bf84c3c 100644 --- a/common/src/main/java/com/discordsrv/common/storage/impl/sql/hikari/MariaDBStorage.java +++ b/common/src/main/java/com/discordsrv/common/storage/impl/sql/hikari/MariaDBStorage.java @@ -4,7 +4,6 @@ import com.discordsrv.common.DiscordSRV; import com.discordsrv.common.config.connection.StorageConfig; import com.discordsrv.common.exception.StorageException; import com.zaxxer.hikari.HikariConfig; -import dev.vankka.dependencydownload.classloader.IsolatedClassLoader; import java.io.IOException; import java.sql.Connection; @@ -12,8 +11,6 @@ import java.sql.SQLException; public class MariaDBStorage extends HikariStorage { - private IsolatedClassLoader classLoader; - public MariaDBStorage(DiscordSRV discordSRV) { super(discordSRV); } @@ -21,19 +18,13 @@ public class MariaDBStorage extends HikariStorage { @Override public void close() { super.close(); - if (classLoader != null) { - try { - classLoader.close(); - } catch (IOException e) { - discordSRV.logger().error("Failed to close isolated classloader", e); - } - } } @Override public void initialize() { try { - initializeWithContext(classLoader = discordSRV.dependencyManager().mariadb().loadIntoIsolated()); + discordSRV.dependencyManager().mariadb().download().join(); + super.initialize(); } catch (IOException e) { throw new StorageException(e); } diff --git a/settings.gradle b/settings.gradle index 1c0cdf0d..313276d5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -72,7 +72,9 @@ dependencyResolutionManagement { } // DynamicProxy - library('dynamicproxy', 'dev.vankka', 'dynamicproxy').version('1.0.0') + version('dynamicproxy', '1.0.1-SNAPSHOT') + library('dynamicproxy-api', 'dev.vankka', 'dynamicproxy').versionRef('dynamicproxy') + library('dynamicproxy-runtime', 'dev.vankka', 'dynamicproxy-runtime').versionRef('dynamicproxy') // Jackson library('jackson-databind', 'com.fasterxml.jackson.core', 'jackson-databind').version('2.14.2')