Files
CraftBank/build.gradle.kts
T
Purpur Build eddc706c9a feat: CraftBank Folia 1.21.8 经济与银行核心插件初始实现
实现完整的现金/钱包、银行卡、支票、活期储蓄与定期存款系统,
实现并以 Highest 优先级注册 Vault Economy 接口,接入 PlaceholderAPI。
全程遵循 Folia 调度模型(AsyncScheduler / 实体区域线程),
数据缓存线程安全,支票兑现与定期领取做防刷处理。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 18:16:15 +08:00

66 lines
2.1 KiB
Kotlin
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
plugins {
java
id("com.gradleup.shadow") version "8.3.5"
}
group = "com.craftbank"
version = "1.0.0"
// 用当前 JDK25)编译,通过 --release 21 产出兼容 Java 21 的字节码,
// 避免 toolchain 触发额外的 JDK 下载。Folia 要求运行时为 Java 21+。
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/") // Paper / Folia API
maven("https://jitpack.io") // Vault API
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // PlaceholderAPI
}
dependencies {
// Folia API(含 Paper + Bukkit + Folia 调度器)。运行时由服务端提供。
compileOnly("dev.folia:folia-api:1.21.8-R0.1-SNAPSHOT")
// Vault 经济接口。运行时由 Vault 插件提供。
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")
// PlaceholderAPI(可选软依赖)。运行时由其插件提供。
compileOnly("me.clip:placeholderapi:2.11.6")
// 需要打进最终 jar 的运行时库。
implementation("org.xerial:sqlite-jdbc:3.46.1.3")
implementation("com.zaxxer:HikariCP:5.1.0")
// MySQL 驱动由用户按需放入服务端 lib(避免 jar 膨胀)。如需内置取消下行注释:
// implementation("com.mysql:mysql-connector-j:9.0.0")
}
tasks {
compileJava {
options.encoding = "UTF-8"
options.release.set(21)
}
processResources {
// 把 ${version} 占位符替换为项目版本号。
val props = mapOf("version" to project.version.toString())
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
shadowJar {
archiveClassifier.set("")
// 不做包重定位:当前 shadow 版本的字节码重映射器在新 JDK 产出的
// invokedynamic class 上会失败;HikariCP/SQLite 直接原样打包即可。
}
build {
dependsOn(shadowJar)
}
// 仅产出 shadowJar,禁用空的默认 jar。
jar {
enabled = false
}
}