9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-19 15:09:24 +00:00
Files
Custom-Fishing/core/build.gradle.kts
2025-11-08 14:47:28 +08:00

97 lines
5.0 KiB
Plaintext

repositories {
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // papi
maven("https://libraries.minecraft.net") // brigadier
maven("https://jitpack.io/") // sparrow-heart, rtag
maven("https://repo.papermc.io/repository/maven-public/") // paper
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") // spigot
maven("https://repo.momirealms.net/releases/")
}
dependencies {
// platform
compileOnly("dev.folia:folia-api:${rootProject.properties["paper_version"]}-R0.1-SNAPSHOT")
// subprojects
implementation(project(":api")) {
exclude("dev.dejvokep", "boosted-yaml")
}
implementation(project(":compatibility"))
// adventure
implementation("net.kyori:adventure-api:${rootProject.properties["adventure_bundle_version"]}")
implementation("net.kyori:adventure-text-minimessage:${rootProject.properties["adventure_bundle_version"]}")
implementation("net.kyori:adventure-platform-bukkit:${rootProject.properties["adventure_platform_version"]}")
implementation("net.kyori:adventure-text-serializer-gson:${rootProject.properties["adventure_bundle_version"]}") {
exclude("com.google.code.gson", "gson")
}
implementation("net.kyori:adventure-text-serializer-json-legacy-impl:${rootProject.properties["adventure_bundle_version"]}")
// tag & component
implementation("com.saicone.rtag:rtag:${rootProject.properties["rtag_version"]}")
implementation("com.saicone.rtag:rtag-item:${rootProject.properties["rtag_version"]}")
// nms util
implementation("net.momirealms:sparrow-heart:${rootProject.properties["sparrow_heart_version"]}")
// bstats
compileOnly("org.bstats:bstats-bukkit:${rootProject.properties["bstats_version"]}")
// config
compileOnly("dev.dejvokep:boosted-yaml:${rootProject.properties["boosted_yaml_version"]}")
// serialization
compileOnly("com.google.code.gson:gson:${rootProject.properties["gson_version"]}")
// database
compileOnly("org.xerial:sqlite-jdbc:${rootProject.properties["sqlite_driver_version"]}")
compileOnly("com.h2database:h2:${rootProject.properties["h2_driver_version"]}")
compileOnly("org.mongodb:mongodb-driver-sync:${rootProject.properties["mongodb_driver_version"]}")
compileOnly("com.zaxxer:HikariCP:${rootProject.properties["hikari_version"]}")
compileOnly("redis.clients:jedis:${rootProject.properties["jedis_version"]}")
// cloud command framework
compileOnly("org.incendo:cloud-core:${rootProject.properties["cloud_core_version"]}")
compileOnly("org.incendo:cloud-minecraft-extras:${rootProject.properties["cloud_minecraft_extras_version"]}")
compileOnly("org.incendo:cloud-paper:${rootProject.properties["cloud_paper_version"]}")
// brigadier
compileOnly("com.mojang:brigadier:${rootProject.properties["mojang_brigadier_version"]}")
// expression
compileOnly("net.objecthunter:exp4j:${rootProject.properties["exp4j_version"]}")
// placeholder api
compileOnly("me.clip:placeholderapi:${rootProject.properties["placeholder_api_version"]}")
// lz4
compileOnly("org.lz4:lz4-java:${rootProject.properties["lz4_version"]}")
}
tasks {
shadowJar {
archiveFileName = "CustomFishing-${rootProject.properties["project_version"]}.jar"
destinationDirectory.set(file("$rootDir/target"))
relocate("net.kyori", "net.momirealms.customfishing.libraries")
relocate("org.incendo", "net.momirealms.customfishing.libraries")
relocate("dev.dejvokep", "net.momirealms.customfishing.libraries")
relocate("org.apache.commons.pool2", "net.momirealms.customfishing.libraries.commonspool2")
relocate("com.mysql", "net.momirealms.customfishing.libraries.mysql")
relocate("org.mariadb", "net.momirealms.customfishing.libraries.mariadb")
relocate("com.zaxxer.hikari", "net.momirealms.customfishing.libraries.hikari")
relocate("com.mongodb", "net.momirealms.customfishing.libraries.mongodb")
relocate("org.bson", "net.momirealms.customfishing.libraries.bson")
relocate("org.bstats", "net.momirealms.customfishing.libraries.bstats")
relocate("com.github.benmanes.caffeine", "net.momirealms.customfishing.libraries.caffeine")
relocate("net.momirealms.sparrow.heart", "net.momirealms.customfishing.bukkit.nms")
relocate("com.saicone.rtag", "net.momirealms.customfishing.libraries.rtag")
relocate("net.objecthunter.exp4j", "net.momirealms.customfishing.libraries.exp4j")
relocate("net.jpountz", "net.momirealms.customfishing.libraries.jpountz") //lz4
relocate("redis.clients.jedis", "net.momirealms.customfishing.libraries.jedis")
}
}
artifacts {
archives(tasks.shadowJar)
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
dependsOn(tasks.clean)
}