Move dependency downloader code out of project

This commit is contained in:
Jason Penilla committed 2023-11-02 16:37:18 -07:00
1 parent 13c1e98872
commit 2ed9025101
13 files changed
+51 -517

No files matched your search

+2 -9
View File
@@ -12,16 +12,11 @@ dependencies {
implementation(libs.cloudVelocity)
compileOnly(libs.miniplaceholders)
runtimeOnly(libs.jarRelocator)
runtimeDownload(libs.mysql)
}
configurations.runtimeClasspath {
resolutionStrategy.force(
"org.ow2.asm:asm:9.6",
"org.ow2.asm:asm-commons:9.6",
)
gremlin {
defaultJarRelocatorDependencies.set(true)
}
tasks {
@@ -30,8 +25,6 @@ tasks {
standardRuntimeRelocations()
relocateDependency("com.google.inject.assistedinject")
relocateDependency("io.leangen.geantyref")
relocateDependency("me.lucko.jarrelocator")
relocateDependency("org.objectweb.asm")
}
writeDependencies {
standardRuntimeRelocations()
@@ -34,6 +34,7 @@ import net.draycia.carbon.common.util.CarbonDependencies;
import org.bstats.charts.SimplePie;
import org.bstats.velocity.Metrics;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import xyz.jpenilla.gremlin.runtime.platformsupport.VelocityClasspathAppender;
public final class CarbonVelocityBootstrap {
@@ -63,9 +64,8 @@ public final class CarbonVelocityBootstrap {
@Subscribe
public void onProxyInitialize(final ProxyInitializeEvent event) {
CarbonDependencies.load(
this.dataDirectory.resolve("libraries"),
path -> this.proxy.getPluginManager().addToClasspath(this, path)
new VelocityClasspathAppender(this.proxy, this).append(
CarbonDependencies.resolve(this.dataDirectory.resolve("libraries"))
);
this.injector = this.parentInjector.createChildInjector(