Files
hamster-core/core-velocity/build.gradle.kts
MiniDay 1648a56453
All checks were successful
Publish Project / build (push) Successful in 2m43s
feat: 添加 lettuce-core 用于连接 redis
2025-07-03 02:29:02 +08:00

56 lines
1.5 KiB
Plaintext

@file:Suppress("VulnerableLibrariesLocal")
evaluationDependsOn(":core-common")
dependencies {
api(project(":core-common")) { isTransitive = false }
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
annotationProcessor("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
compileOnlyApi("net.kyori:adventure-platform-api:4.3.2") { isTransitive = false }
implementation("com.zaxxer:HikariCP:5.1.0") { isTransitive = false }
api("redis.clients:jedis:5.1.4") {
exclude(group = "com.google.code.gson")
exclude(group = "org.slf4j")
}
api("io.lettuce:lettuce-core:6.7.1.RELEASE") {
exclude(group = "io.netty")
exclude(group = "org.slf4j")
}
// https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
}
sourceSets.create("templates") {
java {
srcDir("src/main/templates")
}
}
val templateSource = file("src/main/templates")
val templateDest = layout.buildDirectory.dir("generated/sources/templates")
val generateTemplates = tasks.register<Copy>("generateTemplates") {
from(templateSource)
into(templateDest)
expand(rootProject.properties)
}
sourceSets.main.get().java.srcDir(generateTemplates.map { it.outputs })
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
tasks {
withType<Jar> {
archiveBaseName = "HamsterCore-Velocity"
}
shadowJar {
destinationDirectory = rootProject.layout.buildDirectory
}
}