diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000000..a23e703b58 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,49 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Gradle + +on: + push: + branches: + - master + - main + + pull_request: + branches: + - master + - main + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: gradle + + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build with Gradle + run: ./gradlew build + + - uses: actions/upload-artifact@v4 + with: + name: QuickShop-Hikari + path: | + **/build/libs/*.jar \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3cd100df7d..6da75fb54c 100644 --- a/.gitignore +++ b/.gitignore @@ -111,6 +111,23 @@ buildNumber.properties .mvn/wrapper/maven-wrapper.jar .flattened-pom.xml +## From gitignore/Gradle.gitignore on GitHub +.gradle +**/build/ +!**/src/**/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Avoid ignore Gradle wrappper properties +!gradle-wrapper.properties + +# Cache of project +.gradletasknamecache + # Common working directory run/ /build-artifacts/ diff --git a/addon/bluemap/build.gradle.kts b/addon/bluemap/build.gradle.kts new file mode 100644 index 0000000000..4802b9c1da --- /dev/null +++ b/addon/bluemap/build.gradle.kts @@ -0,0 +1,36 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.de.bluecolored.bluemap.bluemapapi) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-Addon-BlueMap-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Addon-BlueMap-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-BlueMap" \ No newline at end of file diff --git a/addon/discordsrv/build.gradle.kts b/addon/discordsrv/build.gradle.kts new file mode 100644 index 0000000000..eddd784b92 --- /dev/null +++ b/addon/discordsrv/build.gradle.kts @@ -0,0 +1,36 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.discordsrv.discordsrv) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-Addon-DiscordSRV-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Addon-DiscordSRV-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-DiscordSRV" diff --git a/addon/discount/build.gradle.kts b/addon/discount/build.gradle.kts new file mode 100644 index 0000000000..74bb98a204 --- /dev/null +++ b/addon/discount/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-Addon-Discount-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Addon-Discount-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-Discount" diff --git a/addon/displaycontrol/build.gradle.kts b/addon/displaycontrol/build.gradle.kts new file mode 100644 index 0000000000..f284588d6e --- /dev/null +++ b/addon/displaycontrol/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-Addon-DisplayControl-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Addon-DisplayControl-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-DisplayControl" diff --git a/addon/dynmap/build.gradle.kts b/addon/dynmap/build.gradle.kts new file mode 100644 index 0000000000..cb1068a79e --- /dev/null +++ b/addon/dynmap/build.gradle.kts @@ -0,0 +1,36 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.org.dynmap.dynmapcoreapi) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-Dynmap" diff --git a/addon/limited/build.gradle.kts b/addon/limited/build.gradle.kts new file mode 100644 index 0000000000..f73602d1aa --- /dev/null +++ b/addon/limited/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-Limited" diff --git a/addon/list/build.gradle.kts b/addon/list/build.gradle.kts new file mode 100644 index 0000000000..5d8d3e60c8 --- /dev/null +++ b/addon/list/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-List" diff --git a/addon/plan/build.gradle.kts b/addon/plan/build.gradle.kts new file mode 100644 index 0000000000..1f8fbf1eac --- /dev/null +++ b/addon/plan/build.gradle.kts @@ -0,0 +1,38 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(libs.com.github.juliomarcopineda.jdbc.stream) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.github.plan.player.analytics.plan) + compileOnly(libs.cc.carm.lib.easysql.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-Addon-Plan-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Addon-Plan-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-Plan" diff --git a/addon/reremake-migrator/build.gradle.kts b/addon/reremake-migrator/build.gradle.kts new file mode 100644 index 0000000000..50280a33b6 --- /dev/null +++ b/addon/reremake-migrator/build.gradle.kts @@ -0,0 +1,42 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(libs.de.themoep.minedown.adventure) + api(libs.com.ghostchu.thirdparty.jsonconfiguration) + api(libs.net.minidev.json.smart) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.io.vavr.vavr) + compileOnly(libs.org.maxgamer.quickshop) { + isTransitive = false + } + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-Addon-ReRemake-Migrator-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Addon-ReRemake-Migrator-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-Reremake-Migrator" diff --git a/addon/shopitemonly/build.gradle.kts b/addon/shopitemonly/build.gradle.kts new file mode 100644 index 0000000000..506e71845b --- /dev/null +++ b/addon/shopitemonly/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-Addon-ShopItemOnly-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Addon-ShopItemOnly-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.addon" +description = "Addon-ShopItemOnly" diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000000..8abc8e3a12 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,134 @@ +plugins { + `java` + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +group = "com.ghostchu.quickshop" +version = "6.2.0.11-SNAPSHOT-4" +description = "The QuickShop Fork Pushing the Boundaries." +val relocation = "com.ghostchu.quickshop.shade" + +repositories { + mavenCentral() + maven { + name = "PaperMC" + url = uri("https://repo.papermc.io/repository/maven-public/") + } +} + +dependencies { + compileOnly(libs.annotations.jetbrains) +} + +subprojects { + + apply(plugin = "java") + + java { + withSourcesJar() + withJavadocJar() + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } + } + + tasks { + + compileJava { + options.encoding = "UTF-8" + options.release.set(21) + + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + from("../LICENSE") + } + } +} + +//TODO: Publishing to modrinth, etc + +publishing { + publications.create("shadow") { + from(components["shadow"]) + + pom { + name = rootProject.name + description = "QuickShop Hikari is a QuickShop fork for Modern Minecraft servers." + url = "https://modrinth.com/plugin/quickshop-hikari" + organization { + name = "QuickShop Community" + url = "https://github.com/QuickShop-Community" + } + licenses { + license { + name = "GNU AFFERO General Public License, Version 3 (AGPL-3.0)" + url = "https://github.com/QuickShop-Community/QuickShop-Hikari/blob/hikari/LICENSE" + } + } + developers { + developer { + id = "creatorfromhell" + name = "Daniel \"creatorfromhell\" Vidmar" + email = "daniel.viddy@gmail.com" + url = "https://cfh.dev" + organization = "The New Economy" + organizationUrl = "https://tnemc.net" + } + developer { + id = "Ghost_chu" + name = "Ghost chu" + email = "2908803755@qq.com" + url = "https://www.ghostchu.com" + } + } + scm { + connection = "scm:git:git://github.com/QuickShop-Community/QuickShop-Hikari.git" + developerConnection = "scm:git:git://github.com/QuickShop-Community/QuickShop-Hikari.git" + url = "https://github.com/QuickShop-Community/QuickShop-Hikari" + } + issueManagement { + system = "GitHub" + url = "https://github.com/QuickShop-Community/QuickShop-Hikari/issues" + } + } + } + + repositories { + maven { + name = "CodeMC" + url = uri("https://repo.codemc.io/repository/ghost-chu/") + + val mavenUsername = System.getenv("GRADLE_PROJECT_MAVEN_USERNAME") + val mavenPassword = System.getenv("GRADLE_PROJECT_MAVEN_PASSWORD") + if (mavenUsername != null && mavenPassword != null) { + credentials { + username = mavenUsername + password = mavenPassword + } + } + } + } +} + +tasks.withType { + options.encoding = "UTF-8" + options.compilerArgs.add("-parameters") +} + +tasks.withType { + isFailOnError = false + + options.encoding = "UTF-8" + (options as StandardJavadocDocletOptions).apply { + windowTitle = "QuickShop-Hikari" + isAuthor = true + isVersion = true + links ("https://docs.oracle.com/javase/21/docs/api/", "") + bottom = "creatorfromhell, 2025" + isNoTimestamp = true + } +} \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 0000000000..018784784e --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,13 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build. + `kotlin-dsl` +} + +repositories { + // Use the plugin portal to apply community plugins in convention plugins. + gradlePluginPortal() +} diff --git a/buildSrc/src/main/kotlin/buildlogic.java-conventions.gradle.kts b/buildSrc/src/main/kotlin/buildlogic.java-conventions.gradle.kts new file mode 100644 index 0000000000..5132f4613e --- /dev/null +++ b/buildSrc/src/main/kotlin/buildlogic.java-conventions.gradle.kts @@ -0,0 +1,191 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + `java-library` + `maven-publish` +} + +repositories { + mavenCentral() + maven { + url = uri("https://repo.papermc.io/repository/maven-public/") + } + + maven { + url = uri("https://repo.maven.apache.org/maven2/") + } + + maven { + url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") + } + + maven { + url = uri("https://repo.codemc.io/repository/maven-releases/") + } + + maven { + url = uri("https://repo.codemc.io/repository/maven-snapshots/") + } + + maven { + url = uri("https://repo.codemc.io/repository/maven-public/") + } + + maven { + url = uri("https://repo.dmulloy2.net/repository/public/") + } + + maven { + url = uri("https://repo.essentialsx.net/releases/") + } + + maven { + url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/") + } + + maven { + url = uri("https://repo.tcoded.com/releases") + } + + maven { + url = uri("https://www.jitpack.io") + } + + maven { + url = uri("https://maven.mohistmc.com/") + } + + maven { + url = uri("https://jitpack.io") + } + + maven { + url = uri("https://repo.bluecolored.de/releases") + } + + maven { + url = uri("https://m2.dv8tion.net/releases") + } + + maven { + url = uri("https://nexus.scarsz.me/content/groups/public/") + } + + maven { + url = uri("https://repo.mikeprimm.com/") + } + + maven { + url = uri("https://repo.minebench.de/") + } + + maven { + url = uri("https://nexus.alex9849.net/repository/maven-releases/") + } + + maven { + url = uri("https://nexus.alex9849.net/repository/maven-snapshots/") + } + + maven { + url = uri("https://repo.jeff-media.com/public/") + } + + maven { + url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") + } + + maven { + url = uri("https://repo.codemc.org/repository/maven-snapshots") + } + + maven { + url = uri("https://repo.codemc.org/repository/maven-public/") + } + + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots") + } + + maven { + url = uri("https://repo.opencollab.dev/main") + } + + maven { + url = uri("https://repo.opencollab.dev/maven-snapshots") + } + + maven { + url = uri("https://repo.auxilor.io/repository/maven-public/") + } + + maven { + url = uri("https://oss.sonatype.org/content/groups/public/") + } + + maven { + url = uri("https://repo.magmaguy.com/releases") + } + + maven { + url = uri("https://repo.songoda.com/repository/minecraft-plugins/") + } + + maven { + url = uri("https://repo.william278.net/releases") + } + + maven { + url = uri("https://nexus.iridiumdevelopment.net/repository/maven-releases/") + } + + maven { + url = uri("https://maven.devs.beer/") + } + + maven { + url = uri("https://repo.nexomc.com/releases") + } + + maven { + url = uri("https://repo.oraxen.com/releases") + } + + maven { + url = uri("https://repo.xenondevs.xyz/releases") + } + + maven { + url = uri("https://repo.jsinco.dev/releases") + } + + maven { + url = uri("https://maven.enginehub.org/repo/") + } + + maven { + url = uri("https://repo.bg-software.com/repository/api/") + } + + maven { + url = uri("https://repo.glaremasters.me/repository/towny/") + } + + maven { + url = uri("https://repo.georgev22.com/releases") + } +} + +dependencies { + compileOnly("org.jetbrains:annotations:26.0.2") + compileOnly("org.projectlombok:lombok:1.18.38") + annotationProcessor("org.projectlombok:lombok:1.18.38") + + testCompileOnly("org.projectlombok:lombok:1.18.38") + testAnnotationProcessor("org.projectlombok:lombok:1.18.38") +} + +group = "com.ghostchu" +version = "6.2.0.11-SNAPSHOT-4" diff --git a/compatibility/advancedregionmarket/build.gradle.kts b/compatibility/advancedregionmarket/build.gradle.kts new file mode 100644 index 0000000000..ba4dec53ed --- /dev/null +++ b/compatibility/advancedregionmarket/build.gradle.kts @@ -0,0 +1,38 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.net.alex9849.advancedregionmarket.advancedregionmarket) + + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-AdvancedRegionMarket" diff --git a/compatibility/angelchest/build.gradle.kts b/compatibility/angelchest/build.gradle.kts new file mode 100644 index 0000000000..0baa14ffd7 --- /dev/null +++ b/compatibility/angelchest/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.de.jeff.media.angelchestapi) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-AngelChest" diff --git a/compatibility/bentobox/build.gradle.kts b/compatibility/bentobox/build.gradle.kts new file mode 100644 index 0000000000..18060d71a8 --- /dev/null +++ b/compatibility/bentobox/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.world.bentobox.bentobox) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-BentoBox" diff --git a/compatibility/bungeecord-geyser/build.gradle.kts b/compatibility/bungeecord-geyser/build.gradle.kts new file mode 100644 index 0000000000..feecc3f859 --- /dev/null +++ b/compatibility/bungeecord-geyser/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.net.md.v5.bungeecord.api) + compileOnly(libs.net.md.v5.bungeecord.api) + compileOnly(libs.org.geysermc.geyser.api) + compileOnly(libs.org.geysermc.floodgate.api) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-BungeeCord-Geyser" diff --git a/compatibility/bungeecord/build.gradle.kts b/compatibility/bungeecord/build.gradle.kts new file mode 100644 index 0000000000..a9e2ec7b5d --- /dev/null +++ b/compatibility/bungeecord/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.net.md.v5.bungeecord.api) + compileOnly(libs.net.md.v5.bungeecord.api) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-BungeeCord" diff --git a/compatibility/chestprotect/build.gradle.kts b/compatibility/chestprotect/build.gradle.kts new file mode 100644 index 0000000000..85fef6a9b4 --- /dev/null +++ b/compatibility/chestprotect/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.github.angeschossen.chestprotectapi) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-ChestProtect" diff --git a/compatibility/clearlag/build.gradle.kts b/compatibility/clearlag/build.gradle.kts new file mode 100644 index 0000000000..e0ea3bc04a --- /dev/null +++ b/compatibility/clearlag/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) + compileOnly(files("lib/Clearlag-3.2.2.jar")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-Clearlag" diff --git a/compatibility/common/build.gradle.kts b/compatibility/common/build.gradle.kts new file mode 100644 index 0000000000..d0a0c9108f --- /dev/null +++ b/compatibility/common/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "quickshop-compatibility-common" diff --git a/compatibility/dominion/build.gradle.kts b/compatibility/dominion/build.gradle.kts new file mode 100644 index 0000000000..051ed143c3 --- /dev/null +++ b/compatibility/dominion/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.cn.lunadeer.dominionapi) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-Dominion" diff --git a/compatibility/ecoenchants/build.gradle.kts b/compatibility/ecoenchants/build.gradle.kts new file mode 100644 index 0000000000..ffe3ab91ff --- /dev/null +++ b/compatibility/ecoenchants/build.gradle.kts @@ -0,0 +1,38 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.willfp.ecoenchants) + compileOnly(libs.com.willfp.eco) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-EcoEnchants" diff --git a/compatibility/elitemobs/build.gradle.kts b/compatibility/elitemobs/build.gradle.kts new file mode 100644 index 0000000000..9219aff69d --- /dev/null +++ b/compatibility/elitemobs/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.magmaguy.elitemobs) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-EliteMobs" diff --git a/compatibility/fabledskyblock/build.gradle.kts b/compatibility/fabledskyblock/build.gradle.kts new file mode 100644 index 0000000000..d5b7078d44 --- /dev/null +++ b/compatibility/fabledskyblock/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.craftaro.fabledskyblock) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-FabledSkyBlock" diff --git a/compatibility/griefprevention/build.gradle.kts b/compatibility/griefprevention/build.gradle.kts new file mode 100644 index 0000000000..4399b9d3fa --- /dev/null +++ b/compatibility/griefprevention/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.github.techfortress.griefprevention) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-GriefPrevention" diff --git a/compatibility/husktowns/build.gradle.kts b/compatibility/husktowns/build.gradle.kts new file mode 100644 index 0000000000..a9c4c4bd55 --- /dev/null +++ b/compatibility/husktowns/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.net.william278.husktowns.husktowns.bukkit) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-HuskTowns" diff --git a/compatibility/iridiumskyblock/build.gradle.kts b/compatibility/iridiumskyblock/build.gradle.kts new file mode 100644 index 0000000000..a5b143ac64 --- /dev/null +++ b/compatibility/iridiumskyblock/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.iridium.iridiumskyblock) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-IridiumSkyblock" diff --git a/compatibility/itemsadder/build.gradle.kts b/compatibility/itemsadder/build.gradle.kts new file mode 100644 index 0000000000..dcb83d57c9 --- /dev/null +++ b/compatibility/itemsadder/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.dev.lone.api.itemsadder) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-ItemsAdder" diff --git a/compatibility/lands/build.gradle.kts b/compatibility/lands/build.gradle.kts new file mode 100644 index 0000000000..bec8ee4028 --- /dev/null +++ b/compatibility/lands/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.github.angeschossen.landsapi) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-Lands" diff --git a/compatibility/matcherplus/build.gradle.kts b/compatibility/matcherplus/build.gradle.kts new file mode 100644 index 0000000000..c41ea75ac1 --- /dev/null +++ b/compatibility/matcherplus/build.gradle.kts @@ -0,0 +1,41 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + api(libs.com.dre.brewery.breweryx) + api(libs.com.github.slimefun.slimefun4) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.nexomc.nexo) + compileOnly(libs.io.th0rgal.oraxen) + compileOnly(libs.xyz.xenondevs.nova.nova.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-MatcherPlus" diff --git a/compatibility/openinv/build.gradle.kts b/compatibility/openinv/build.gradle.kts new file mode 100644 index 0000000000..2514947961 --- /dev/null +++ b/compatibility/openinv/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.github.jikoo.openinv.openinvapi) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-OpenInv" diff --git a/compatibility/plotsquared/build.gradle.kts b/compatibility/plotsquared/build.gradle.kts new file mode 100644 index 0000000000..fa9d07e6b6 --- /dev/null +++ b/compatibility/plotsquared/build.gradle.kts @@ -0,0 +1,44 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) { + exclude(group = "com.google.code.gson", module = "gson") + } + compileOnly(libs.com.intellectualsites.plotsquared.plotsquared.bukkit) { + exclude(group = "com.google.code.gson", module = "gson") + } + compileOnly(libs.com.sk89q.worldedit.worldedit.bukkit) { + exclude(group = "com.google.code.gson", module = "gson") + } + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-PlotSquared" diff --git a/compatibility/reforges/build.gradle.kts b/compatibility/reforges/build.gradle.kts new file mode 100644 index 0000000000..ea4a4698e7 --- /dev/null +++ b/compatibility/reforges/build.gradle.kts @@ -0,0 +1,38 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.willfp.reforges) + compileOnly(libs.com.willfp.eco) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-Reforges" diff --git a/compatibility/residence/build.gradle.kts b/compatibility/residence/build.gradle.kts new file mode 100644 index 0000000000..be56a43448 --- /dev/null +++ b/compatibility/residence/build.gradle.kts @@ -0,0 +1,38 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) + compileOnly(files("lib/CMILib1.5.4.1.jar")) + compileOnly(files("lib/Residence5.1.7.3.jar")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-Residence" diff --git a/compatibility/slimefun/build.gradle.kts b/compatibility/slimefun/build.gradle.kts new file mode 100644 index 0000000000..8037271488 --- /dev/null +++ b/compatibility/slimefun/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + api(libs.com.github.slimefun.slimefun4) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-Slimefun" diff --git a/compatibility/superiorskyblock/build.gradle.kts b/compatibility/superiorskyblock/build.gradle.kts new file mode 100644 index 0000000000..30ad5088b4 --- /dev/null +++ b/compatibility/superiorskyblock/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.bgsoftware.superiorskyblockapi) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-SuperiorSkyblock" diff --git a/compatibility/towny/build.gradle.kts b/compatibility/towny/build.gradle.kts new file mode 100644 index 0000000000..eab8450f74 --- /dev/null +++ b/compatibility/towny/build.gradle.kts @@ -0,0 +1,38 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.palmergames.bukkit.towny.towny) + compileOnly(libs.net.tnemc.economycore) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-Towny" diff --git a/compatibility/velocity/build.gradle.kts b/compatibility/velocity/build.gradle.kts new file mode 100644 index 0000000000..203f8e4264 --- /dev/null +++ b/compatibility/velocity/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(libs.com.velocitypowered.velocity.api) + compileOnly(libs.com.velocitypowered.velocity.api) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-Velocity" diff --git a/compatibility/voidchest/build.gradle.kts b/compatibility/voidchest/build.gradle.kts new file mode 100644 index 0000000000..52d659c90b --- /dev/null +++ b/compatibility/voidchest/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.georgev22.voidchest.shade.voidchestapi.shade) + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-VoidChest" diff --git a/compatibility/worldedit/build.gradle.kts b/compatibility/worldedit/build.gradle.kts new file mode 100644 index 0000000000..462d54eae5 --- /dev/null +++ b/compatibility/worldedit/build.gradle.kts @@ -0,0 +1,41 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) { + exclude(group = "com.google.code.gson", module = "gson") + } + compileOnly(libs.com.sk89q.worldedit.worldedit.bukkit) { + exclude(group = "com.google.code.gson", module = "gson") + } + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-WorldEdit" diff --git a/compatibility/worldguard/build.gradle.kts b/compatibility/worldguard/build.gradle.kts new file mode 100644 index 0000000000..7eda2f4576 --- /dev/null +++ b/compatibility/worldguard/build.gradle.kts @@ -0,0 +1,41 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(project(":common")) + compileOnly(libs.io.papermc.paper.paper.api) { + exclude(group = "com.google.code.gson", module = "gson") + } + compileOnly(libs.com.sk89q.worldguard.worldguard.bukkit) { + exclude(group = "com.google.code.gson", module = "gson") + } + compileOnly(project(":quickshop-bukkit")) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-${description}-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-${description}-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +group = "com.ghostchu.quickshop.compatibility" +description = "Compat-WorldGuard" diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000000..ac1a35f78f --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +org.gradle.configuration-cache=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000000..cb9299b6d1 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,180 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format + +[versions] +annotations-jetbrains = "24.0.0" +cc-carm-lib-easysql-api = "0.4.7" +cc-carm-lib-easysql-hikaricp = "0.4.7" +cn-lunadeer-dominionapi = "4.3" +com-bgsoftware-superiorskyblockapi = "1.11.1" +com-comphenix-protocol-protocollib = "5.3.0" +com-craftaro-fabledskyblock = "3.5.2-SNAPSHOT" +com-discordsrv-discordsrv = "1.29.0" +com-dre-brewery-breweryx = "3.4.3" +com-georgev22-voidchest-shade-voidchestapi-shade = "3.0.0" +com-ghostchu-crowdin-crowdinota = "1.0.3" +com-ghostchu-lib-unofficial-com-alessiodp-libby-libby-bukkit = "2.0.2-SNAPSHOT" +com-ghostchu-lib-unofficial-com-alessiodp-libby-libby-core = "2.0.2-SNAPSHOT" +com-ghostchu-simplereloadlib = "1.1.2" +com-ghostchu-thirdparty-jsonconfiguration = "1.2-20230922.165143-1" +com-github-angeschossen-chestprotectapi = "5.19.16" +com-github-angeschossen-landsapi = "7.15.20" +com-github-jikoo-openinv-openinvapi = "5.1.6" +com-github-juliomarcopineda-jdbc-stream = "0.1.1" +com-github-milkbowl-vaultapi = "1.7.1" +com-github-plan-player-analytics-plan = "5.6.2965" +com-github-retrooper-packetevents-spigot = "2.9.0-SNAPSHOT" +com-github-slimefun-slimefun4 = "RC-37" +com-github-techfortress-griefprevention = "17.0.0" +com-google-code-gson-gson = "2.13.1" +com-h2database-h2 = "2.1.214" +com-intellectualsites-plotsquared-plotsquared-bukkit = "7.5.2" +com-iridium-iridiumskyblock = "4.1.0" +com-konghq-unirest-java = "3.14.5" +com-magmaguy-elitemobs = "9.2.3" +com-nexomc-nexo = "1.1.0" +com-palmergames-bukkit-towny-towny = "0.101.1.15" +com-rollbar-rollbar-java = "2.0.0" +com-sk89q-worldedit-worldedit-bukkit = "7.3.11" +com-sk89q-worldguard-worldguard-bukkit = "7.0.13" +com-tcoded-folialib = "0.5.1" +com-vdurmont-semver4j = "3.1.0" +com-velocitypowered-velocity-api = "3.1.2-SNAPSHOT" +com-willfp-eco = "6.75.2" +com-willfp-ecoenchants = "12.22.0" +com-willfp-reforges = "6.74.0" +de-bluecolored-bluemap-bluemapapi = "2.7.2" +de-jeff-media-angelchestapi = "13.6.1" +de-themoep-minedown-adventure = "1.7.4-SNAPSHOT" +de-tr7zw-item-nbt-api-plugin = "2.15.0" +dev-lone-api-itemsadder = "4.0.10" +io-papermc-paper-paper-api = "1.21.4-R0.1-SNAPSHOT" +io-th0rgal-oraxen = "1.189.0" +io-vavr-vavr = "0.10.7" +me-clip-placeholderapi = "2.11.6" +me-minebuilders-clearlag = "3.2.2" +net-alex9849-advancedregionmarket-advancedregionmarket = "3.5.5" +net-essentialsx-essentialsx = "2.21.0" +net-kyori-adventure-api = "4.16.0" +net-kyori-adventure-key = "4.16.0" +net-kyori-adventure-text-logger-slf4j = "4.16.0" +net-kyori-adventure-text-minimessage = "4.16.0" +net-kyori-adventure-text-serializer-ansi = "4.16.0" +net-kyori-adventure-text-serializer-json = "4.16.0" +net-kyori-adventure-text-serializer-legacy = "4.16.0" +net-kyori-adventure-text-serializer-plain = "4.16.0" +net-kyori-examination-api = "1.3.0" +net-kyori-examination-string = "1.3.0" +net-md-v5-bungeecord-api = "1.20-R0.2" +net-milkbowl-vault-vaultunlockedapi = "2.13" +net-minidev-json-smart = "1.3.2" +net-sourceforge-csvjdbc-csvjdbc = "1.0.42" +net-tnemc-economycore = "0.1.3.6-Pre-1" +net-tnemc-tnil-bukkit = "0.1.7.6-LEGACY-13" +net-tnemc-tnil-core = "0.1.7.6-LEGACY-13" +net-tnemc-tnml-bukkit = "1.6.0.0-SNAPSHOT-15" +net-tnemc-tnml-core = "1.6.0.0-SNAPSHOT-15" +net-tnemc-tnml-folia = "1.6.0.0-SNAPSHOT-15" +net-william278-husktowns-husktowns-bukkit = "3.1.4" +org-apache-commons-commons-compress = "1.26.2" +org-apache-commons-commons-lang3 = "3.18.0" +org-bstats-bstats-bukkit = "3.0.2" +org-dom4j-dom4j = "2.1.4" +org-dynmap-dynmapcoreapi = "2.0" +org-geysermc-floodgate-api = "2.0-SNAPSHOT" +org-geysermc-geyser-api = "2.1.0-SNAPSHOT" +org-maxgamer-quickshop = "5.1.2.5-SNAPSHOT" +org-slf4j-slf4j-jdk14 = "2.0.17" +world-bentobox-bentobox = "2.7.0-SNAPSHOT" +xyz-xenondevs-nova-nova-api = "0.18" +zrips-cmilib-cmilib = "1.2.2.0" +zrips-residence-residence = "5.0.1.7" + +[libraries] +annotations-jetbrains = { module = "org.jetbrains:annotations", version.ref = "annotations-jetbrains" } +cc-carm-lib-easysql-api = { module = "cc.carm.lib:easysql-api", version.ref = "cc-carm-lib-easysql-api" } +cc-carm-lib-easysql-hikaricp = { module = "cc.carm.lib:easysql-hikaricp", version.ref = "cc-carm-lib-easysql-hikaricp" } +cn-lunadeer-dominionapi = { module = "cn.lunadeer:DominionAPI", version.ref = "cn-lunadeer-dominionapi" } +com-bgsoftware-superiorskyblockapi = { module = "com.bgsoftware:SuperiorSkyblockAPI", version.ref = "com-bgsoftware-superiorskyblockapi" } +com-comphenix-protocol-protocollib = { module = "com.comphenix.protocol:ProtocolLib", version.ref = "com-comphenix-protocol-protocollib" } +com-craftaro-fabledskyblock = { module = "com.craftaro:FabledSkyBlock", version.ref = "com-craftaro-fabledskyblock" } +com-discordsrv-discordsrv = { module = "com.discordsrv:discordsrv", version.ref = "com-discordsrv-discordsrv" } +com-dre-brewery-breweryx = { module = "com.dre.brewery:BreweryX", version.ref = "com-dre-brewery-breweryx" } +com-georgev22-voidchest-shade-voidchestapi-shade = { module = "com.georgev22.voidchest-shade:voidchestapi-shade", version.ref = "com-georgev22-voidchest-shade-voidchestapi-shade" } +com-ghostchu-crowdin-crowdinota = { module = "com.ghostchu.crowdin:crowdinota", version.ref = "com-ghostchu-crowdin-crowdinota" } +com-ghostchu-lib-unofficial-com-alessiodp-libby-libby-bukkit = { module = "com.ghostchu.lib.unofficial.com.alessiodp.libby:libby-bukkit", version.ref = "com-ghostchu-lib-unofficial-com-alessiodp-libby-libby-bukkit" } +com-ghostchu-lib-unofficial-com-alessiodp-libby-libby-core = { module = "com.ghostchu.lib.unofficial.com.alessiodp.libby:libby-core", version.ref = "com-ghostchu-lib-unofficial-com-alessiodp-libby-libby-core" } +com-ghostchu-simplereloadlib = { module = "com.ghostchu:simplereloadlib", version.ref = "com-ghostchu-simplereloadlib" } +com-ghostchu-thirdparty-jsonconfiguration = { module = "com.ghostchu.thirdparty:JsonConfiguration", version.ref = "com-ghostchu-thirdparty-jsonconfiguration" } +com-github-angeschossen-chestprotectapi = { module = "com.github.angeschossen:ChestProtectAPI", version.ref = "com-github-angeschossen-chestprotectapi" } +com-github-angeschossen-landsapi = { module = "com.github.angeschossen:LandsAPI", version.ref = "com-github-angeschossen-landsapi" } +com-github-jikoo-openinv-openinvapi = { module = "com.github.jikoo.OpenInv:openinvapi", version.ref = "com-github-jikoo-openinv-openinvapi" } +com-github-juliomarcopineda-jdbc-stream = { module = "com.github.juliomarcopineda:jdbc-stream", version.ref = "com-github-juliomarcopineda-jdbc-stream" } +com-github-milkbowl-vaultapi = { module = "com.github.MilkBowl:VaultAPI", version.ref = "com-github-milkbowl-vaultapi" } +com-github-plan-player-analytics-plan = { module = "com.github.plan-player-analytics:Plan", version.ref = "com-github-plan-player-analytics-plan" } +com-github-retrooper-packetevents-spigot = { module = "com.github.retrooper:packetevents-spigot", version.ref = "com-github-retrooper-packetevents-spigot" } +com-github-slimefun-slimefun4 = { module = "com.github.Slimefun:Slimefun4", version.ref = "com-github-slimefun-slimefun4" } +com-github-techfortress-griefprevention = { module = "com.github.TechFortress:GriefPrevention", version.ref = "com-github-techfortress-griefprevention" } +com-google-code-gson-gson = { module = "com.google.code.gson:gson", version.ref = "com-google-code-gson-gson" } +com-h2database-h2 = { module = "com.h2database:h2", version.ref = "com-h2database-h2" } +com-intellectualsites-plotsquared-plotsquared-bukkit = { module = "com.intellectualsites.plotsquared:plotsquared-bukkit", version.ref = "com-intellectualsites-plotsquared-plotsquared-bukkit" } +com-iridium-iridiumskyblock = { module = "com.iridium:IridiumSkyblock", version.ref = "com-iridium-iridiumskyblock" } +com-konghq-unirest-java = { module = "com.konghq:unirest-java", version.ref = "com-konghq-unirest-java" } +com-magmaguy-elitemobs = { module = "com.magmaguy:EliteMobs", version.ref = "com-magmaguy-elitemobs" } +com-nexomc-nexo = { module = "com.nexomc:nexo", version.ref = "com-nexomc-nexo" } +com-palmergames-bukkit-towny-towny = { module = "com.palmergames.bukkit.towny:towny", version.ref = "com-palmergames-bukkit-towny-towny" } +com-rollbar-rollbar-java = { module = "com.rollbar:rollbar-java", version.ref = "com-rollbar-rollbar-java" } +com-sk89q-worldedit-worldedit-bukkit = { module = "com.sk89q.worldedit:worldedit-bukkit", version.ref = "com-sk89q-worldedit-worldedit-bukkit" } +com-sk89q-worldguard-worldguard-bukkit = { module = "com.sk89q.worldguard:worldguard-bukkit", version.ref = "com-sk89q-worldguard-worldguard-bukkit" } +com-tcoded-folialib = { module = "com.tcoded:FoliaLib", version.ref = "com-tcoded-folialib" } +com-vdurmont-semver4j = { module = "com.vdurmont:semver4j", version.ref = "com-vdurmont-semver4j" } +com-velocitypowered-velocity-api = { module = "com.velocitypowered:velocity-api", version.ref = "com-velocitypowered-velocity-api" } +com-willfp-eco = { module = "com.willfp:eco", version.ref = "com-willfp-eco" } +com-willfp-ecoenchants = { module = "com.willfp:EcoEnchants", version.ref = "com-willfp-ecoenchants" } +com-willfp-reforges = { module = "com.willfp:Reforges", version.ref = "com-willfp-reforges" } +de-bluecolored-bluemap-bluemapapi = { module = "de.bluecolored.bluemap:BlueMapAPI", version.ref = "de-bluecolored-bluemap-bluemapapi" } +de-jeff-media-angelchestapi = { module = "de.jeff_media:AngelChestAPI", version.ref = "de-jeff-media-angelchestapi" } +de-themoep-minedown-adventure = { module = "de.themoep:minedown-adventure", version.ref = "de-themoep-minedown-adventure" } +de-tr7zw-item-nbt-api-plugin = { module = "de.tr7zw:item-nbt-api-plugin", version.ref = "de-tr7zw-item-nbt-api-plugin" } +dev-lone-api-itemsadder = { module = "dev.lone:api-itemsadder", version.ref = "dev-lone-api-itemsadder" } +io-papermc-paper-paper-api = { module = "io.papermc.paper:paper-api", version.ref = "io-papermc-paper-paper-api" } +io-th0rgal-oraxen = { module = "io.th0rgal:oraxen", version.ref = "io-th0rgal-oraxen" } +io-vavr-vavr = { module = "io.vavr:vavr", version.ref = "io-vavr-vavr" } +me-clip-placeholderapi = { module = "me.clip:placeholderapi", version.ref = "me-clip-placeholderapi" } +me-minebuilders-clearlag = { module = "me.minebuilders:clearlag", version.ref = "me-minebuilders-clearlag" } +net-alex9849-advancedregionmarket-advancedregionmarket = { module = "net.alex9849.advancedregionmarket:advancedregionmarket", version.ref = "net-alex9849-advancedregionmarket-advancedregionmarket" } +net-essentialsx-essentialsx = { module = "net.essentialsx:EssentialsX", version.ref = "net-essentialsx-essentialsx" } +net-kyori-adventure-api = { module = "net.kyori:adventure-api", version.ref = "net-kyori-adventure-api" } +net-kyori-adventure-key = { module = "net.kyori:adventure-key", version.ref = "net-kyori-adventure-key" } +net-kyori-adventure-text-logger-slf4j = { module = "net.kyori:adventure-text-logger-slf4j", version.ref = "net-kyori-adventure-text-logger-slf4j" } +net-kyori-adventure-text-minimessage = { module = "net.kyori:adventure-text-minimessage", version.ref = "net-kyori-adventure-text-minimessage" } +net-kyori-adventure-text-serializer-ansi = { module = "net.kyori:adventure-text-serializer-ansi", version.ref = "net-kyori-adventure-text-serializer-ansi" } +net-kyori-adventure-text-serializer-json = { module = "net.kyori:adventure-text-serializer-json", version.ref = "net-kyori-adventure-text-serializer-json" } +net-kyori-adventure-text-serializer-legacy = { module = "net.kyori:adventure-text-serializer-legacy", version.ref = "net-kyori-adventure-text-serializer-legacy" } +net-kyori-adventure-text-serializer-plain = { module = "net.kyori:adventure-text-serializer-plain", version.ref = "net-kyori-adventure-text-serializer-plain" } +net-kyori-examination-api = { module = "net.kyori:examination-api", version.ref = "net-kyori-examination-api" } +net-kyori-examination-string = { module = "net.kyori:examination-string", version.ref = "net-kyori-examination-string" } +net-md-v5-bungeecord-api = { module = "net.md-5:bungeecord-api", version.ref = "net-md-v5-bungeecord-api" } +net-milkbowl-vault-vaultunlockedapi = { module = "net.milkbowl.vault:VaultUnlockedAPI", version.ref = "net-milkbowl-vault-vaultunlockedapi" } +net-minidev-json-smart = { module = "net.minidev:json-smart", version.ref = "net-minidev-json-smart" } +net-sourceforge-csvjdbc-csvjdbc = { module = "net.sourceforge.csvjdbc:csvjdbc", version.ref = "net-sourceforge-csvjdbc-csvjdbc" } +net-tnemc-economycore = { module = "net.tnemc:EconomyCore", version.ref = "net-tnemc-economycore" } +net-tnemc-tnil-bukkit = { module = "net.tnemc:TNIL-Bukkit", version.ref = "net-tnemc-tnil-bukkit" } +net-tnemc-tnil-core = { module = "net.tnemc:TNIL-Core", version.ref = "net-tnemc-tnil-core" } +net-tnemc-tnml-bukkit = { module = "net.tnemc:TNML-Bukkit", version.ref = "net-tnemc-tnml-bukkit" } +net-tnemc-tnml-core = { module = "net.tnemc:TNML-CORE", version.ref = "net-tnemc-tnml-core" } +net-tnemc-tnml-folia = { module = "net.tnemc:TNML-Folia", version.ref = "net-tnemc-tnml-folia" } +net-william278-husktowns-husktowns-bukkit = { module = "net.william278.husktowns:husktowns-bukkit", version.ref = "net-william278-husktowns-husktowns-bukkit" } +org-apache-commons-commons-compress = { module = "org.apache.commons:commons-compress", version.ref = "org-apache-commons-commons-compress" } +org-apache-commons-commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "org-apache-commons-commons-lang3" } +org-bstats-bstats-bukkit = { module = "org.bstats:bstats-bukkit", version.ref = "org-bstats-bstats-bukkit" } +org-dom4j-dom4j = { module = "org.dom4j:dom4j", version.ref = "org-dom4j-dom4j" } +org-dynmap-dynmapcoreapi = { module = "org.dynmap:DynmapCoreAPI", version.ref = "org-dynmap-dynmapcoreapi" } +org-geysermc-floodgate-api = { module = "org.geysermc.floodgate:api", version.ref = "org-geysermc-floodgate-api" } +org-geysermc-geyser-api = { module = "org.geysermc.geyser:api", version.ref = "org-geysermc-geyser-api" } +org-maxgamer-quickshop = { module = "org.maxgamer:QuickShop", version.ref = "org-maxgamer-quickshop" } +org-slf4j-slf4j-jdk14 = { module = "org.slf4j:slf4j-jdk14", version.ref = "org-slf4j-slf4j-jdk14" } +world-bentobox-bentobox = { module = "world.bentobox:bentobox", version.ref = "world-bentobox-bentobox" } +xyz-xenondevs-nova-nova-api = { module = "xyz.xenondevs.nova:nova-api", version.ref = "xyz-xenondevs-nova-nova-api" } +zrips-cmilib-cmilib = { module = "zrips.cmilib:CMILib", version.ref = "zrips-cmilib-cmilib" } +zrips-residence-residence = { module = "zrips.residence:Residence", version.ref = "zrips-residence-residence" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000..8bdaf60c75 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..2a84e188b8 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000000..ef07e0162b --- /dev/null +++ b/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000000..db3a6ac207 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/platform/quickshop-platform-interface/build.gradle.kts b/platform/quickshop-platform-interface/build.gradle.kts new file mode 100644 index 0000000000..b02d0559d7 --- /dev/null +++ b/platform/quickshop-platform-interface/build.gradle.kts @@ -0,0 +1,43 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(project(":quickshop-common")) + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.de.tr7zw.item.nbt.api.plugin) +} + +java { + withSourcesJar() + withJavadocJar() + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-QuickShop-Platform-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Platform-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +description = "quickshop-platform-interface" diff --git a/platform/quickshop-platform-paper/build.gradle.kts b/platform/quickshop-platform-paper/build.gradle.kts new file mode 100644 index 0000000000..a287931c15 --- /dev/null +++ b/platform/quickshop-platform-paper/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + compileOnly(project(":quickshop-common")) + compileOnly(project(":quickshop-platform-interface")) + compileOnly(libs.io.papermc.paper.paper.api) +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-QuickShop-Paper-Platform-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Paper-Platform-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +description = "quickshop-platform-paper" diff --git a/pom.xml b/pom.xml index 44aff4e0f2..2d8efed9f9 100644 --- a/pom.xml +++ b/pom.xml @@ -260,14 +260,6 @@ io.vertx. ${qs.relocation}.io.vertx. - createShop(long dataId); @@ -60,8 +58,6 @@ public interface DatabaseHelper { * * @param shopId The shop record id * @param location The shop location - * - * @throws SQLException something going wrong */ CompletableFuture<@NotNull Void> createShopMap(long shopId, @NotNull Location location); @@ -71,8 +67,6 @@ public interface DatabaseHelper { * @param dataId The data Id * * @return The data record, null for not exists - * - * @throws SQLException something going wrong */ @NotNull CompletableFuture<@Nullable DataRecord> getDataRecord(long dataId); diff --git a/quickshop-api/src/main/java/com/ghostchu/quickshop/api/shop/Shop.java b/quickshop-api/src/main/java/com/ghostchu/quickshop/api/shop/Shop.java index bf24327343..05322b0df4 100644 --- a/quickshop-api/src/main/java/com/ghostchu/quickshop/api/shop/Shop.java +++ b/quickshop-api/src/main/java/com/ghostchu/quickshop/api/shop/Shop.java @@ -563,7 +563,7 @@ default List getSignText(@NotNull final ProxiedLocale locale) { * @param seller Seller * @param sellerInventory Seller's inventory ( may not a player inventory ) * @param loc2Drop The location to be drop if buyer inventory full ( if player enter a - * number that < 0, it will turn to buying item) + * number that < 0, it will turn to buying item) * @param paramInt How many sold? * * @throws Exception Possible exception thrown if anything wrong. diff --git a/quickshop-api/src/main/java/com/ghostchu/quickshop/api/shop/ShopManager.java b/quickshop-api/src/main/java/com/ghostchu/quickshop/api/shop/ShopManager.java index 9e978a7bcc..840d06fa05 100644 --- a/quickshop-api/src/main/java/com/ghostchu/quickshop/api/shop/ShopManager.java +++ b/quickshop-api/src/main/java/com/ghostchu/quickshop/api/shop/ShopManager.java @@ -353,7 +353,6 @@ boolean actionSelling( * Load shop method for loading shop into mapping, so getShops method will can find it. It also * effects a lots of feature, make sure load it after create it. * - * @param world The world the shop is in * @param shop The shop to load */ void loadShop(@NotNull Shop shop); @@ -362,7 +361,6 @@ boolean actionSelling( * Load shop method for loading shop into mapping, so getShops method will can find it. It also * effects a lots of feature, make sure load it after create it. * - * @param world The world the shop is in * @param shop The shop to load */ void unloadShop(@NotNull Shop shop); @@ -371,7 +369,6 @@ boolean actionSelling( * Load shop method for loading shop into mapping, so getShops method will can find it. It also * effects a lots of feature, make sure load it after create it. * - * @param world The world the shop is in * @param shop The shop to load * @param chunkUnloading If unloadShop called caused by chunk unloading, when this is true, * QuickShop will try avoid any main-thread opreations to avoid @@ -385,20 +382,24 @@ boolean actionSelling( void migrateOwnerToUnlimitedShopOwner(Shop shop); /** - * Register shop to database. + * Registers a shop in the system. This may optionally include persisting the shop's + * information to a database or some other storage mechanism. * - * @param info The info object - * - * @return True if the shop was register successfully. + * @param shop the shop object to be registered. Must not be null. + * @param persist indicates whether the shop's information should be persisted. + * If true, the shop data will be saved persistently. + * @return a CompletableFuture representing the status of the registration operation. + * The future will complete when the registration process is finished. */ CompletableFuture registerShop(@NotNull Shop shop, boolean persist); /** - * Unregister a shop from database. - * - * @param info The info object + * Unregisters the specified shop from the system. If the persist flag is true, the + * shop's removal will also be persisted in the underlying data store. * - * @return True if the shop was unregister successfully. + * @param shop the shop to be unregistered; must not be null + * @param persist a boolean indicating whether the unregistration should be persisted + * @return a CompletableFuture representing the pending completion of the unregistration process */ CompletableFuture unregisterShop(@NotNull Shop shop, boolean persist); diff --git a/quickshop-bukkit/build.gradle.kts b/quickshop-bukkit/build.gradle.kts new file mode 100644 index 0000000000..8451bf13d7 --- /dev/null +++ b/quickshop-bukkit/build.gradle.kts @@ -0,0 +1,70 @@ +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + shadow(project(":quickshop-common")) + shadow(project(":quickshop-api")) + shadow(project(":quickshop-platform-interface")) + shadow(project(":quickshop-platform-paper")) + shadow(libs.net.tnemc.tnml.folia) + shadow(libs.net.tnemc.tnml.bukkit) + shadow(libs.net.tnemc.tnil.bukkit) + shadow(libs.net.tnemc.tnml.core) + shadow(libs.net.tnemc.tnil.core) + shadow(libs.org.bstats.bstats.bukkit) + shadow(libs.cc.carm.lib.easysql.hikaricp) + shadow(libs.org.apache.commons.commons.compress) + shadow(libs.com.tcoded.folialib) + shadow(libs.com.ghostchu.lib.unofficial.com.alessiodp.libby.libby.core) + shadow(libs.com.ghostchu.lib.unofficial.com.alessiodp.libby.libby.bukkit) + shadow(libs.org.apache.commons.commons.lang3) + shadow(libs.org.slf4j.slf4j.jdk14) + shadow(libs.com.google.code.gson.gson) + shadow(libs.com.ghostchu.simplereloadlib) + shadow(libs.cc.carm.lib.easysql.api) + shadow(libs.com.vdurmont.semver4j) + shadow(libs.net.kyori.adventure.text.serializer.ansi) { + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.io.papermc.paper.paper.api) + compileOnly(libs.com.comphenix.protocol.protocollib) + compileOnly(libs.com.github.retrooper.packetevents.spigot) + compileOnly(libs.net.milkbowl.vault.vaultunlockedapi) + compileOnly(libs.com.github.milkbowl.vaultapi) + compileOnly(libs.me.clip.placeholderapi) + compileOnly(libs.net.tnemc.economycore) + compileOnly(libs.com.h2database.h2) + compileOnly(libs.com.konghq.unirest.java) + compileOnly(libs.net.sourceforge.csvjdbc.csvjdbc) + compileOnly(libs.org.dom4j.dom4j) + compileOnly(libs.net.essentialsx.essentialsx) { + exclude("org.spigotmc", "spigot-api") + } + compileOnly(libs.com.ghostchu.crowdin.crowdinota) + compileOnly(libs.com.rollbar.rollbar.java) { + exclude("org.slf4j", "slf4j-api") + } +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-QuickShop-Bukkit-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Bukkit-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +description = "QuickShop-Hikari" \ No newline at end of file diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/QuickShop.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/QuickShop.java index f3532af503..316f8d9e78 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/QuickShop.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/QuickShop.java @@ -114,7 +114,6 @@ import com.google.common.cache.CacheBuilder; import com.tcoded.folialib.FoliaLib; import com.vdurmont.semver4j.Semver; -import io.papermc.lib.PaperLib; import lombok.Getter; import lombok.Setter; import net.tnemc.item.AbstractItemStack; @@ -1252,7 +1251,7 @@ public ReloadResult reloadModule() throws Exception { public AbstractItemStack stack() { - if(PaperLib.isPaper()) { + if(folia.isPaper()) { return new PaperItemStack(); } return new BukkitItemStack(); diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/QuickShopBukkit.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/QuickShopBukkit.java index 7c0e026569..943ad37c41 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/QuickShopBukkit.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/QuickShopBukkit.java @@ -11,7 +11,6 @@ import com.ghostchu.quickshop.platform.paper.PaperPlatform; import com.ghostchu.quickshop.util.PackageUtil; import com.vdurmont.semver4j.Semver; -import io.papermc.lib.PaperLib; import kong.unirest.Unirest; import lombok.Getter; import org.bukkit.Bukkit; @@ -218,13 +217,15 @@ private void loadLibraries(final LibraryManager manager) { private void loadPlatform() throws Exception { int platformId = 0; - if(PaperLib.isSpigot()) { - platformId = 1; - } - if(PaperLib.isPaper()) { + //Check for paper first since paper also contains some spigot classes. + if(CommonUtil.isClassAvailable("io.papermc.paper.plugin.configuration.PluginMeta")) { platformId = 2; } + if(CommonUtil.isClassAvailable("org.spigotmc.CustomTimingsHandler")) { + platformId = 1; + } + platformId = PackageUtil.parsePackageProperly("forcePlatform").asInteger(platformId); try { switch(platformId) { diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/command/subcommand/SubCommand_Find.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/command/subcommand/SubCommand_Find.java index 2ed677f550..5bfa5460ac 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/command/subcommand/SubCommand_Find.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/command/subcommand/SubCommand_Find.java @@ -8,7 +8,6 @@ import com.ghostchu.quickshop.api.shop.permission.BuiltInShopPermission; import com.ghostchu.quickshop.util.MsgUtil; import com.ghostchu.quickshop.util.Util; -import io.papermc.lib.PaperLib; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.bukkit.ChatColor; @@ -122,8 +121,8 @@ public void onCommand(@NotNull final Player sender, @NotNull final String comman if(usingOldLogic) { final Map.Entry closest = sortedShops.getFirst(); final Location lookAt = closest.getKey().getLocation().clone().add(0.5, 0.5, 0.5); - PaperLib.teleportAsync(sender, Util.lookAt(sender.getEyeLocation(), lookAt).add(0, -1.62, 0), - PlayerTeleportEvent.TeleportCause.UNKNOWN); + sender.teleportAsync(Util.lookAt(sender.getEyeLocation(), lookAt).add(0, -1.62, 0), + PlayerTeleportEvent.TeleportCause.PLUGIN); plugin.text().of(sender, "nearby-shop-this-way", closest.getValue().intValue()).send(); } else { plugin.text().of(sender, "nearby-shop-header", lookFor).send(); diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/AbstractShopManager.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/AbstractShopManager.java index 7e2cf0bbde..b123726ba3 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/AbstractShopManager.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/AbstractShopManager.java @@ -22,7 +22,6 @@ import com.google.common.collect.MapMaker; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import io.papermc.lib.PaperLib; import lombok.AllArgsConstructor; import lombok.Data; import lombok.Getter; @@ -433,7 +432,7 @@ public Shop findShopIncludeAttached(@NotNull final Location loc, final boolean f } } else { // optimize for performance - final BlockState state = PaperLib.getBlockState(currentBlock, false).getState(); + final BlockState state = currentBlock.getState(false); if(!(state instanceof InventoryHolder)) { return null; } diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/ContainerShop.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/ContainerShop.java index 493717f38b..2d4d04d1ae 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/ContainerShop.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/ContainerShop.java @@ -47,7 +47,6 @@ import com.ghostchu.quickshop.util.performance.PerfMonitor; import com.ghostchu.simplereloadlib.ReloadResult; import com.ghostchu.simplereloadlib.Reloadable; -import io.papermc.lib.PaperLib; import lombok.EqualsAndHashCode; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; @@ -884,7 +883,7 @@ public List getSignText(@NotNull final ProxiedLocale locale) { if(b == null) { continue; } - final BlockState state = PaperLib.getBlockState(b, false).getState(); + final BlockState state = b.getState(false); if(!(state instanceof final Sign sign)) { continue; } diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/MsgUtil.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/MsgUtil.java index dec73bd897..ce52942125 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/MsgUtil.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/MsgUtil.java @@ -153,7 +153,7 @@ public static String fillArgs(@Nullable String raw, @Nullable final String... ar final String arg = args[i]; final String replacement = (arg == null? "" : arg); - raw = raw.replaceAll(Pattern.quote("{" + i + "}"), Pattern.quote(replacement)); + raw = raw.replaceAll(Pattern.quote("{" + i + "}"), replacement); //raw = StringUtils.replace(raw, "{" + i + "}", args[i] == null? "" : args[i]); } return raw; diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/Util.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/Util.java index 02606191d1..bb39c30486 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/Util.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/Util.java @@ -17,7 +17,6 @@ import com.ghostchu.quickshop.shop.SimpleInfo; import com.ghostchu.quickshop.shop.display.AbstractDisplayItem; import com.ghostchu.quickshop.util.logger.Log; -import io.papermc.lib.PaperLib; import lombok.Getter; import lombok.Setter; import net.kyori.adventure.text.Component; @@ -277,7 +276,7 @@ public static boolean canBeShop(@NotNull final Block b) { if(!isShoppables(b.getType())) { return false; } - final BlockState bs = PaperLib.getBlockState(b, false).getState(); + final BlockState bs = b.getState(false); final boolean container = bs instanceof InventoryHolder; if(!container) { if(Util.isDevMode()) { diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/envcheck/EnvironmentChecker.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/envcheck/EnvironmentChecker.java index c272cc7419..67e750cbd0 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/envcheck/EnvironmentChecker.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/envcheck/EnvironmentChecker.java @@ -11,7 +11,6 @@ import com.ghostchu.quickshop.util.Util; import com.ghostchu.quickshop.util.logger.Log; import com.vdurmont.semver4j.Semver; -import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; @@ -342,12 +341,12 @@ private void sortTests() { }); } - @EnvCheckEntry(name = "Spigot Based Server Test", priority = 2) - public ResultContainer spigotBasedServer() { + @EnvCheckEntry(name = "Paper Based Server Test", priority = 2) + public ResultContainer paperBasedServer() { final ResultContainer success = new ResultContainer(CheckResult.PASSED, "Server"); - final ResultContainer failed = new ResultContainer(CheckResult.STOP_WORKING, "Server must be Spigot based, Don't use CraftBukkit!"); - if(!PaperLib.isSpigot()) { + final ResultContainer failed = new ResultContainer(CheckResult.STOP_WORKING, "Server must be Paper based, Don't use CraftBukkit!"); + if(!CommonUtil.isClassAvailable("io.papermc.paper.plugin.configuration.PluginMeta")) { return failed; } return success; diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/paste/item/ChatProcessorInfoItem.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/paste/item/ChatProcessorInfoItem.java index 694df59234..efd1e6cf7d 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/paste/item/ChatProcessorInfoItem.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/paste/item/ChatProcessorInfoItem.java @@ -3,11 +3,8 @@ import com.ghostchu.quickshop.common.util.CommonUtil; import com.ghostchu.quickshop.util.paste.util.HTMLTable; import net.kyori.adventure.Adventure; -import net.kyori.adventure.platform.bukkit.BukkitAudiences; -import net.kyori.adventure.platform.viaversion.ViaFacet; import net.kyori.adventure.text.minimessage.MiniMessage; import net.kyori.adventure.text.serializer.ansi.ANSIComponentSerializer; -import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer; import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; import net.kyori.adventure.text.serializer.json.JSONComponentSerializer; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; @@ -42,12 +39,12 @@ private String buildContent() { table.insert("Processor", IMPL); table.insert("Formatter", FORMATTER); table.insert("Adventure API", CommonUtil.getClassPathRelative(Adventure.class)); - table.insert("Adventure Bukkit Platform", CommonUtil.getClassPathRelative(BukkitAudiences.class)); + //table.insert("Adventure Bukkit Platform", CommonUtil.getClassPathRelative(BukkitAudiences.class)); table.insert("Adventure Text Serializer (Legacy)", CommonUtil.getClassPathRelative(LegacyComponentSerializer.class)); table.insert("Adventure Text Serializer (Gson)", CommonUtil.getClassPathRelative(GsonComponentSerializer.class)); table.insert("Adventure Text Serializer (Json)", CommonUtil.getClassPathRelative(JSONComponentSerializer.class)); - table.insert("Adventure Text Serializer (BungeeChat)", CommonUtil.getClassPathRelative(BungeeComponentSerializer.class)); - table.insert("Adventure Text Serializer (ViaVersion Facet)", CommonUtil.getClassPathRelative(ViaFacet.class)); + //table.insert("Adventure Text Serializer (BungeeChat)", CommonUtil.getClassPathRelative(BungeeComponentSerializer.class)); + // table.insert("Adventure Text Serializer (ViaVersion Facet)", CommonUtil.getClassPathRelative(ViaFacet.class)); table.insert("Adventure Text Serializer (ANSI)", CommonUtil.getClassPathRelative(ANSIComponentSerializer.class)); table.insert("Adventure Text Serializer (Plain)", CommonUtil.getClassPathRelative(PlainTextComponentSerializer.class)); table.insert("Adventure MiniMessage", CommonUtil.getClassPathRelative(MiniMessage.class)); diff --git a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/paste/item/ServerInfoItem.java b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/paste/item/ServerInfoItem.java index 1a241dedea..22cbedb1dc 100644 --- a/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/paste/item/ServerInfoItem.java +++ b/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/util/paste/item/ServerInfoItem.java @@ -4,7 +4,6 @@ import com.ghostchu.quickshop.common.util.CommonUtil; import com.ghostchu.quickshop.util.ReflectFactory; import com.ghostchu.quickshop.util.paste.util.HTMLTable; -import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; import org.jetbrains.annotations.NotNull; @@ -30,12 +29,13 @@ public ServerInfoItem() { this.nmsVersion = ReflectFactory.getNMSVersion() + "/" + plugin.getPlatform().getMinecraftVersion(); this.dataVersion = String.valueOf(Bukkit.getServer().getUnsafe().getDataVersion()); this.moddedServerType = "Bukkit"; - if(PaperLib.isSpigot()) { - this.moddedServerType = "Spigot"; - } - if(PaperLib.isPaper()) { + + if(QuickShop.folia().isPaper()) { this.moddedServerType = "Paper"; } + if(QuickShop.folia().isSpigot()) { + this.moddedServerType = "Spigot"; + } if(plugin.getEnvironmentChecker().isFabricBasedServer()) { this.moddedServerType = "Fabric"; } diff --git a/quickshop-common/build.gradle.kts b/quickshop-common/build.gradle.kts new file mode 100644 index 0000000000..f41f2bcb07 --- /dev/null +++ b/quickshop-common/build.gradle.kts @@ -0,0 +1,62 @@ +plugins { + id("buildlogic.java-conventions") + id("com.gradleup.shadow") version "9.0.0-beta16" apply true +} + +dependencies { + api(libs.org.apache.commons.commons.lang3) + api(libs.org.slf4j.slf4j.jdk14) + api(libs.com.google.code.gson.gson) + api(libs.com.ghostchu.simplereloadlib) + api(libs.cc.carm.lib.easysql.api) + api(libs.com.vdurmont.semver4j) + api(libs.net.kyori.adventure.text.serializer.ansi) { + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.net.kyori.adventure.api) + compileOnly(libs.net.kyori.adventure.key){ + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.net.kyori.adventure.text.logger.slf4j){ + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.net.kyori.adventure.text.minimessage){ + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.net.kyori.adventure.text.serializer.json){ + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.net.kyori.adventure.text.serializer.legacy){ + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.net.kyori.adventure.text.serializer.plain){ + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.net.kyori.examination.api){ + exclude("net.kyori", "adventure-api") + } + compileOnly(libs.net.kyori.examination.string){ + exclude("net.kyori", "adventure-api") + } +} + +tasks { + compileJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + jar { + dependsOn(shadowJar) + archiveFileName = "original-QuickShop-Common-${project.version}.jar" + } + + shadowJar { + archiveFileName = "QuickShop-Common-${project.version}.jar" + archiveClassifier = "" + + configurations = listOf(project.configurations.shadow.get()) + } +} + +description = "quickshop-common" diff --git a/quickshop-common/src/main/java/com/ghostchu/quickshop/common/util/CommonUtil.java b/quickshop-common/src/main/java/com/ghostchu/quickshop/common/util/CommonUtil.java index 6847b48a98..d183d3218d 100644 --- a/quickshop-common/src/main/java/com/ghostchu/quickshop/common/util/CommonUtil.java +++ b/quickshop-common/src/main/java/com/ghostchu/quickshop/common/util/CommonUtil.java @@ -415,7 +415,7 @@ public static boolean isClassAvailable(@NotNull final String qualifiedName) { try { Class.forName(qualifiedName); return true; - } catch(final ClassNotFoundException e) { + } catch(final ClassNotFoundException ignore) { return false; } } diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000000..efc2bb677f --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,112 @@ +rootProject.name = "quickshop-hikari" + +pluginManagement { + repositories { + gradlePluginPortal() + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention").version("1.0.0") +} + +//Core Modules +include(":quickshop-common") +include(":quickshop-api") +include(":quickshop-platform-interface") +include(":quickshop-platform-paper") +include(":quickshop-bukkit") + + +//Addons +include(":bluemap") +include(":discordsrv") +include(":discount") +include(":displaycontrol") +include(":dynmap") +include(":limited") +include(":list") +include(":plan") +include(":reremake-migrator") +include(":shopitemonly") + +//Compatibility Modules +include(":common") + +include(":advancedregionmarket") +include(":angelchest") +include(":bentobox") +include(":bungeecord") +include(":bungeecord-geyser") +include(":chestprotect") +include(":clearlag") +include(":dominion") +include(":ecoenchants") +include(":elitemobs") +include(":fabledskyblock") +include(":griefprevention") +include(":husktowns") +include(":itemsadder") +include(":iridiumskyblock") +include(":lands") +include(":matcherplus") +include(":openinv") +include(":plotsquared") +include(":reforges") +include(":residence") +include(":slimefun") +include(":superiorskyblock") +include(":towny") +include(":velocity") +include(":voidchest") +include(":worldedit") +include(":worldguard") + +//Core Modules +project(":quickshop-platform-interface").projectDir = file("platform/quickshop-platform-interface") +project(":quickshop-platform-paper").projectDir = file("platform/quickshop-platform-paper") + +//Addons +project(":bluemap").projectDir = file("addon/bluemap") +project(":discordsrv").projectDir = file("addon/discordsrv") +project(":discount").projectDir = file("addon/discount") +project(":displaycontrol").projectDir = file("addon/displaycontrol") +project(":dynmap").projectDir = file("addon/dynmap") +project(":limited").projectDir = file("addon/limited") +project(":list").projectDir = file("addon/list") +project(":plan").projectDir = file("addon/plan") +project(":reremake-migrator").projectDir = file("addon/reremake-migrator") +project(":shopitemonly").projectDir = file("addon/shopitemonly") + +//Compatibility Modules + +project(":common").projectDir = file("compatibility/common") + +project(":advancedregionmarket").projectDir = file("compatibility/advancedregionmarket") +project(":angelchest").projectDir = file("compatibility/angelchest") +project(":bentobox").projectDir = file("compatibility/bentobox") +project(":bungeecord").projectDir = file("compatibility/bungeecord") +project(":bungeecord-geyser").projectDir = file("compatibility/bungeecord-geyser") +project(":chestprotect").projectDir = file("compatibility/chestprotect") +project(":clearlag").projectDir = file("compatibility/clearlag") +project(":dominion").projectDir = file("compatibility/dominion") +project(":ecoenchants").projectDir = file("compatibility/ecoenchants") +project(":elitemobs").projectDir = file("compatibility/elitemobs") +project(":fabledskyblock").projectDir = file("compatibility/fabledskyblock") +project(":griefprevention").projectDir = file("compatibility/griefprevention") +project(":husktowns").projectDir = file("compatibility/husktowns") +project(":iridiumskyblock").projectDir = file("compatibility/iridiumskyblock") +project(":itemsadder").projectDir = file("compatibility/itemsadder") +project(":lands").projectDir = file("compatibility/lands") +project(":matcherplus").projectDir = file("compatibility/matcherplus") +project(":openinv").projectDir = file("compatibility/openinv") +project(":plotsquared").projectDir = file("compatibility/plotsquared") +project(":reforges").projectDir = file("compatibility/reforges") +project(":residence").projectDir = file("compatibility/residence") +project(":slimefun").projectDir = file("compatibility/slimefun") +project(":superiorskyblock").projectDir = file("compatibility/superiorskyblock") +project(":towny").projectDir = file("compatibility/towny") +project(":voidchest").projectDir = file("compatibility/voidchest") +project(":worldedit").projectDir = file("compatibility/worldedit") +project(":velocity").projectDir = file("compatibility/velocity") +project(":worldguard").projectDir = file("compatibility/worldguard") \ No newline at end of file