From 2396266a7c44eedf0b88c293a307897555f31ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Sun, 14 Jan 2024 18:56:25 +0100 Subject: [PATCH] chore: move modules & fix build scripts --- cloud-discord/cloud-javacord/build.gradle.kts | 9 --------- cloud-discord/cloud-jda/build.gradle.kts | 9 --------- cloud-javacord/build.gradle.kts | 11 +++++++++++ .../commandframework/javacord/JavacordCommand.java | 0 .../javacord/JavacordCommandManager.java | 0 .../javacord/JavacordRegistrationHandler.java | 0 .../cloud/commandframework/javacord/package-info.java | 0 .../javacord/sender/JavacordCommandSender.java | 0 .../javacord/sender/JavacordPrivateSender.java | 0 .../javacord/sender/JavacordServerSender.java | 0 .../javacord/sender/package-info.java | 0 cloud-jda/build.gradle.kts | 11 +++++++++++ .../commandframework/jda/JDA4CommandManager.java | 0 .../commandframework/jda/JDACommandListener.java | 0 .../cloud/commandframework/jda/JDACommandManager.java | 0 .../commandframework/jda/JDACommandPreprocessor.java | 0 .../cloud/commandframework/jda/JDACommandSender.java | 0 .../cloud/commandframework/jda/JDAGuildSender.java | 0 .../cloud/commandframework/jda/JDAPrivateSender.java | 0 .../java/cloud/commandframework/jda/package-info.java | 0 .../commandframework/jda/parsers/ChannelParser.java | 0 .../commandframework/jda/parsers/RoleParser.java | 0 .../commandframework/jda/parsers/UserParser.java | 0 .../commandframework/jda/parsers/package-info.java | 0 cloud-jda5/build.gradle.kts | 2 +- gradle/libs.versions.toml | 6 +++++- settings.gradle.kts | 6 ++++++ 27 files changed, 34 insertions(+), 20 deletions(-) delete mode 100644 cloud-discord/cloud-javacord/build.gradle.kts delete mode 100644 cloud-discord/cloud-jda/build.gradle.kts create mode 100644 cloud-javacord/build.gradle.kts rename {cloud-discord/cloud-javacord => cloud-javacord}/src/main/java/cloud/commandframework/javacord/JavacordCommand.java (100%) rename {cloud-discord/cloud-javacord => cloud-javacord}/src/main/java/cloud/commandframework/javacord/JavacordCommandManager.java (100%) rename {cloud-discord/cloud-javacord => cloud-javacord}/src/main/java/cloud/commandframework/javacord/JavacordRegistrationHandler.java (100%) rename {cloud-discord/cloud-javacord => cloud-javacord}/src/main/java/cloud/commandframework/javacord/package-info.java (100%) rename {cloud-discord/cloud-javacord => cloud-javacord}/src/main/java/cloud/commandframework/javacord/sender/JavacordCommandSender.java (100%) rename {cloud-discord/cloud-javacord => cloud-javacord}/src/main/java/cloud/commandframework/javacord/sender/JavacordPrivateSender.java (100%) rename {cloud-discord/cloud-javacord => cloud-javacord}/src/main/java/cloud/commandframework/javacord/sender/JavacordServerSender.java (100%) rename {cloud-discord/cloud-javacord => cloud-javacord}/src/main/java/cloud/commandframework/javacord/sender/package-info.java (100%) create mode 100644 cloud-jda/build.gradle.kts rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/JDA4CommandManager.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/JDACommandListener.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/JDACommandManager.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/JDACommandPreprocessor.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/JDACommandSender.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/JDAGuildSender.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/JDAPrivateSender.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/package-info.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/parsers/ChannelParser.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/parsers/RoleParser.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/parsers/UserParser.java (100%) rename {cloud-discord/cloud-jda => cloud-jda}/src/main/java/cloud/commandframework/jda/parsers/package-info.java (100%) diff --git a/cloud-discord/cloud-javacord/build.gradle.kts b/cloud-discord/cloud-javacord/build.gradle.kts deleted file mode 100644 index efd5f92..0000000 --- a/cloud-discord/cloud-javacord/build.gradle.kts +++ /dev/null @@ -1,9 +0,0 @@ -plugins { - id("cloud.base-conventions") - id("cloud.publishing-conventions") -} - -dependencies { - api(projects.cloudCore) - implementation(libs.javacord) -} diff --git a/cloud-discord/cloud-jda/build.gradle.kts b/cloud-discord/cloud-jda/build.gradle.kts deleted file mode 100644 index 59cdde5..0000000 --- a/cloud-discord/cloud-jda/build.gradle.kts +++ /dev/null @@ -1,9 +0,0 @@ -plugins { - id("cloud.base-conventions") - id("cloud.publishing-conventions") -} - -dependencies { - api(projects.cloudCore) - compileOnly(libs.jda) -} diff --git a/cloud-javacord/build.gradle.kts b/cloud-javacord/build.gradle.kts new file mode 100644 index 0000000..b8f74e7 --- /dev/null +++ b/cloud-javacord/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("cloud-discord.base-conventions") + id("cloud-discord.publishing-conventions") +} + +version = "2.0.0-dev" + +dependencies { + api(libs.cloud.core) + implementation(libs.javacord) +} diff --git a/cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordCommand.java b/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordCommand.java similarity index 100% rename from cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordCommand.java rename to cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordCommand.java diff --git a/cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordCommandManager.java b/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordCommandManager.java similarity index 100% rename from cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordCommandManager.java rename to cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordCommandManager.java diff --git a/cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordRegistrationHandler.java b/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordRegistrationHandler.java similarity index 100% rename from cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordRegistrationHandler.java rename to cloud-javacord/src/main/java/cloud/commandframework/javacord/JavacordRegistrationHandler.java diff --git a/cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/package-info.java b/cloud-javacord/src/main/java/cloud/commandframework/javacord/package-info.java similarity index 100% rename from cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/package-info.java rename to cloud-javacord/src/main/java/cloud/commandframework/javacord/package-info.java diff --git a/cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordCommandSender.java b/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordCommandSender.java similarity index 100% rename from cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordCommandSender.java rename to cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordCommandSender.java diff --git a/cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordPrivateSender.java b/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordPrivateSender.java similarity index 100% rename from cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordPrivateSender.java rename to cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordPrivateSender.java diff --git a/cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordServerSender.java b/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordServerSender.java similarity index 100% rename from cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordServerSender.java rename to cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/JavacordServerSender.java diff --git a/cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/package-info.java b/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/package-info.java similarity index 100% rename from cloud-discord/cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/package-info.java rename to cloud-javacord/src/main/java/cloud/commandframework/javacord/sender/package-info.java diff --git a/cloud-jda/build.gradle.kts b/cloud-jda/build.gradle.kts new file mode 100644 index 0000000..3193ad1 --- /dev/null +++ b/cloud-jda/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("cloud-discord.base-conventions") + id("cloud-discord.publishing-conventions") +} + +version = "2.0.0-dev" + +dependencies { + api(libs.cloud.core) + compileOnly(libs.jda) +} diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDA4CommandManager.java b/cloud-jda/src/main/java/cloud/commandframework/jda/JDA4CommandManager.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDA4CommandManager.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/JDA4CommandManager.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandListener.java b/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandListener.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandListener.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandListener.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandManager.java b/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandManager.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandManager.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandManager.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandPreprocessor.java b/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandPreprocessor.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandPreprocessor.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandPreprocessor.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandSender.java b/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandSender.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandSender.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/JDACommandSender.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDAGuildSender.java b/cloud-jda/src/main/java/cloud/commandframework/jda/JDAGuildSender.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDAGuildSender.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/JDAGuildSender.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDAPrivateSender.java b/cloud-jda/src/main/java/cloud/commandframework/jda/JDAPrivateSender.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/JDAPrivateSender.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/JDAPrivateSender.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/package-info.java b/cloud-jda/src/main/java/cloud/commandframework/jda/package-info.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/package-info.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/package-info.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/ChannelParser.java b/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/ChannelParser.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/ChannelParser.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/parsers/ChannelParser.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/RoleParser.java b/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/RoleParser.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/RoleParser.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/parsers/RoleParser.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/UserParser.java b/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/UserParser.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/UserParser.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/parsers/UserParser.java diff --git a/cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/package-info.java b/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/package-info.java similarity index 100% rename from cloud-discord/cloud-jda/src/main/java/cloud/commandframework/jda/parsers/package-info.java rename to cloud-jda/src/main/java/cloud/commandframework/jda/parsers/package-info.java diff --git a/cloud-jda5/build.gradle.kts b/cloud-jda5/build.gradle.kts index 9e80caa..39c6f57 100644 --- a/cloud-jda5/build.gradle.kts +++ b/cloud-jda5/build.gradle.kts @@ -5,5 +5,5 @@ plugins { dependencies { api(projects.cloudDiscordCommon) - implementation(libs.jda) + implementation(libs.jda5) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 06ac429..149ba12 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,7 +14,9 @@ cloud = "2.0.0-SNAPSHOT" # External immutables = "2.10.0" -jda = "5.0.0-beta.19" +javacord = "3.1.1" +jda = "4.2.1_257" +jda5 = "5.0.0-beta.19" # Test jupiterEngine = "5.10.1" @@ -32,7 +34,9 @@ cloud-annotations = { group = "cloud.commandframework", name = "cloud-annotation # External immutables = { group = "org.immutables", name = "value", version.ref = "immutables" } +javacord = { group = "org.javacord", name = "javacord", version.ref = "javacord" } jda = { group = "net.dv8tion", name = "JDA", version.ref = "jda" } +jda5 = { group = "net.dv8tion", name = "JDA", version.ref = "jda5" } # Test jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "jupiterEngine" } diff --git a/settings.gradle.kts b/settings.gradle.kts index d91400c..c47f9b1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -22,10 +22,16 @@ dependencyResolutionManagement { snapshotsOnly() } } + maven("https://m2.dv8tion.net/releases") { + name = "dv8tion" + mavenContent { releasesOnly() } + } } } rootProject.name = "cloud-discord" include(":cloud-discord-common") +include(":cloud-javacord") +include(":cloud-jda") include(":cloud-jda5")