feat: 添加 velocity 支持,取消重定向包名
This commit is contained in:
57
core-velocity/build.gradle.kts
Normal file
57
core-velocity/build.gradle.kts
Normal file
@@ -0,0 +1,57 @@
|
||||
@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")
|
||||
|
||||
implementation("net.kyori:adventure-platform-api:4.3.2") { exclude(group = "org.jetbrains") }
|
||||
// https://mvnrepository.com/artifact/redis.clients/jedis
|
||||
api("redis.clients:jedis:5.1.2") {
|
||||
exclude(group = "com.google.code.gson")
|
||||
exclude(group = "org.slf4j")
|
||||
}
|
||||
// https://mvnrepository.com/artifact/org.quartz-scheduler/quartz
|
||||
api("org.quartz-scheduler:quartz:2.3.2") { isTransitive = false }
|
||||
|
||||
// https://mvnrepository.com/artifact/com.zaxxer/HikariCP
|
||||
implementation("com.zaxxer:HikariCP:5.1.0") { isTransitive = false }
|
||||
|
||||
// https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.3.0")
|
||||
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib
|
||||
runtimeOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.23") { exclude(group = "org.jetbrains") }
|
||||
}
|
||||
|
||||
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(project.properties)
|
||||
}
|
||||
|
||||
sourceSets.main.get().java.srcDir(generateTemplates.map { it.outputs })
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<Jar> {
|
||||
archiveBaseName = "AirGameCore-Velocity"
|
||||
}
|
||||
shadowJar {
|
||||
destinationDirectory = rootProject.layout.buildDirectory
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user