fat jar ftw

This commit is contained in:
Ryder Belserion 2023-07-23 14:28:39 -04:00
parent fd55cebcda
commit 5a69919781
No known key found for this signature in database
5 changed files with 14 additions and 35 deletions

View File

@ -27,22 +27,18 @@ allprojects {
if (this.name == "paper") {
dependencies {
compileOnly("org.bstats", "bstats-bukkit", "3.0.2")
compileOnly("org.bstats", "bstats-bukkit", "3.0.2")
implementation("org.bstats", "bstats-bukkit", "3.0.2")
compileOnly("com.github.MilkBowl", "VaultAPI", "1.7") {
exclude("org.bukkit", "bukkit")
}
//compileOnly("me.lokka30", "treasury-api", "2.0.1-7417830-RELEASE")
}
}
dependencies {
compileOnly("ch.jalu", "configme", "1.3.1")
implementation("ch.jalu", "configme", "1.3.1")
compileOnly("com.github.Carleslc.Simple-YAML", "Simple-Yaml", "1.8.4") {
implementation("com.github.Carleslc.Simple-YAML", "Simple-Yaml", "1.8.4") {
exclude("org.yaml", "snakeyaml")
}
}

View File

@ -13,7 +13,7 @@ dependencies {
implementation("io.papermc.paperweight", "paperweight-userdev", "1.5.5")
implementation("com.ryderbelserion.feather", "feather-plugin", "0.0.0.4");
implementation("com.ryderbelserion.feather", "feather-plugin", "0.0.0.4")
implementation("com.modrinth.minotaur", "Minotaur", "2.8.0")
}

View File

@ -21,5 +21,13 @@ tasks {
archiveBaseName.set("${rootProject.name}-${project.name}")
archiveClassifier.set("")
mergeServiceFiles()
listOf(
"org.bstats",
"org.simpleyaml",
"org.yaml.snakeyaml"
).forEach {
relocate(it, "libs.$it")
}
}
}

View File

@ -4,18 +4,13 @@ import com.badbones69.crazyauctions.api.frame.PaperCore;
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
import io.papermc.paper.plugin.bootstrap.PluginBootstrap;
import io.papermc.paper.plugin.bootstrap.PluginProviderContext;
import io.papermc.paper.plugin.loader.PluginClasspathBuilder;
import io.papermc.paper.plugin.loader.PluginLoader;
import io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.graph.Dependency;
import org.eclipse.aether.repository.RemoteRepository;
import org.jetbrains.annotations.NotNull;
import com.badbones69.crazyauctions.config.types.PluginConfig;
public class CrazyStarter implements PluginBootstrap, PluginLoader {
@SuppressWarnings("ALL")
public class CrazyStarter implements PluginBootstrap {
private ApiManager apiManager;
@ -32,23 +27,4 @@ public class CrazyStarter implements PluginBootstrap, PluginLoader {
return new CrazyAuctions(this.apiManager, paperCore);
}
@Override
public void classloader(@NotNull PluginClasspathBuilder classpathBuilder) {
MavenLibraryResolver resolver = new MavenLibraryResolver();
// Configs
resolver.addDependency(new Dependency(new DefaultArtifact("ch.jalu:configme:1.3.1"), null));
resolver.addDependency(new Dependency(new DefaultArtifact("org.bstats:bstats-bukkit:3.0.2"), null));
resolver.addDependency(new Dependency(new DefaultArtifact("com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4"), null));
// Repositories
resolver.addRepository(new RemoteRepository.Builder("jitpack", "default", "https://jitpack.io").build());
resolver.addRepository(new RemoteRepository.Builder("maven2", "default", "https://repo1.maven.org/maven2").build());
resolver.addRepository(new RemoteRepository.Builder("codemc-repo", "default", "https://repo.codemc.org/repository/maven-public/").build());
classpathBuilder.addLibrary(resolver);
}
}

View File

@ -6,7 +6,6 @@ api-version: '${apiVersion}'
description: '${description}'
bootstrapper: '${group}.CrazyStarter'
loader: '${group}.CrazyStarter'
dependencies:
server: