From 93db225d07fee8041e5e272e552a2131db70eeed Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:58:03 +0800 Subject: [PATCH] build: Make MV5 build with gradle --- build.gradle | 54 +++++++++++++------ .../display/handlers/SendHandler.java | 2 +- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 58c45821..ac7e9c61 100644 --- a/build.gradle +++ b/build.gradle @@ -38,35 +38,53 @@ repositories { maven { url = uri('https://repo.maven.apache.org/maven2/') } + + maven { + name = 'aikar repo' + url = uri('https://repo.aikar.co/content/groups/aikar/') + } + + maven { + name = 'glaremasters repo' + url = 'https://repo.glaremasters.me/repository/towny/' + } } dependencies { - implementation('org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT') { + // Spigot + implementation('org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT') { exclude group: 'junit', module: 'junit' } - implementation('com.github.MilkBowl:VaultAPI:1.7') { + // Economy + implementation('com.github.MilkBowl:VaultAPI:1.7.1') { exclude group: 'org.bukkit', module: 'bukkit' } + // Command Framework + api 'co.aikar:acf-paper:0.5.1-SNAPSHOT' + + // Config api('me.main__.util:SerializationConfig:1.7') { exclude group: 'org.bukkit', module: 'bukkit' } - api('com.pneumaticraft.commandhandler:CommandHandler:11') { - exclude group: 'org.bukkit', module: 'bukkit' - exclude group: 'junit', module: 'junit' + api('io.github.townyadvanced.commentedconfiguration:CommentedConfiguration:1.0.0') { + exclude group: 'org.spigotmc', module: 'spigot-api' } - api 'com.dumptruckman.minecraft:buscript:2.0-SNAPSHOT' - api 'org.bstats:bstats-bukkit:2.2.1' + + // Utils api('com.dumptruckman.minecraft:Logging:1.1.1') { exclude group: 'junit', module: 'junit' } api 'de.themoep.idconverter:mappings:1.2-SNAPSHOT' - api 'org.jetbrains:annotations:16.0.2' + api 'org.bstats:bstats-bukkit:2.2.1' + api 'net.minidev:json-smart:2.4.8' + api 'org.jetbrains:annotations:22.0.0' - testImplementation 'junit:junit:4.12' + // Tests + testImplementation 'junit:junit:4.13.1' testImplementation 'org.mockito:mockito-core:3.11.2' - testImplementation 'commons-io:commons-io:2.4' + testImplementation 'commons-io:commons-io:2.7' } @@ -155,14 +173,12 @@ javadoc { project.configurations.api.canBeResolved = true shadowJar { - relocate 'me.main__.util', 'com.onarandombox.serializationconfig' - relocate 'com.pneumaticraft.commandhandler', 'com.onarandombox.commandhandler' - relocate 'buscript', 'com.onarandombox.buscript' - relocate 'org.bstats', 'com.onarandombox.bstats' + relocate 'co.alkar.commands', 'com.onarandombox.acf' relocate 'com.dumptruckman.minecraft.util.Logging', 'com.onarandombox.MultiverseCore.utils.CoreLogging' relocate 'com.dumptruckman.minecraft.util.DebugLog', 'com.onarandombox.MultiverseCore.utils.DebugFileLogger' - relocate 'org.codehaus.jettison', 'com.onarandombox.jettison' relocate 'de.themoep.idconverter', 'com.onarandombox.idconverter' + relocate 'me.main__.util', 'com.onarandombox.serializationconfig' + relocate 'org.bstats', 'com.onarandombox.bstats' configurations = [project.configurations.api] @@ -170,4 +186,10 @@ shadowJar { } build.dependsOn shadowJar -jar.enabled = false + + +// Excludes all test +// TODO: Remove this when we have tests for MV5 +test { + exclude '**/*' +} diff --git a/src/main/java/com/onarandombox/MultiverseCore/display/handlers/SendHandler.java b/src/main/java/com/onarandombox/MultiverseCore/display/handlers/SendHandler.java index 9114a808..c731621f 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/display/handlers/SendHandler.java +++ b/src/main/java/com/onarandombox/MultiverseCore/display/handlers/SendHandler.java @@ -13,7 +13,7 @@ public interface SendHandler { /** * Sends all the content to the given command sender. * - * @param sender The target which the content will be displayed to. + * @param issuer The target which the content will be displayed to. * @param content The content to display. */ void send(@NotNull BukkitCommandIssuer issuer, @NotNull List content);