build: 在 Velocity 中引入 relocate 后的 netty,防止依赖版本冲突
All checks were successful
Publish Project / build (push) Successful in 5m3s
All checks were successful
Publish Project / build (push) Successful in 5m3s
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
@file:Suppress("VulnerableLibrariesLocal")
|
||||
|
||||
evaluationDependsOn(":core-common")
|
||||
evaluationDependsOn(":core-relocate-lettuce")
|
||||
|
||||
val shade = configurations.create("shade")
|
||||
|
||||
dependencies {
|
||||
api(project(":core-common")) { isTransitive = false }
|
||||
@@ -14,10 +17,11 @@ dependencies {
|
||||
exclude(group = "com.google.code.gson")
|
||||
exclude(group = "org.slf4j")
|
||||
}
|
||||
api("io.lettuce:lettuce-core:6.7.1.RELEASE") {
|
||||
exclude(group = "io.netty")
|
||||
compileOnlyApi("io.lettuce:lettuce-core:6.7.1.RELEASE") {
|
||||
exclude(group = "org.slf4j")
|
||||
exclude(group = "io.netty")
|
||||
}
|
||||
shade(project(":core-relocate-lettuce"))
|
||||
|
||||
// https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
|
||||
@@ -50,6 +54,13 @@ tasks {
|
||||
archiveBaseName = "HamsterCore-Velocity"
|
||||
}
|
||||
shadowJar {
|
||||
dependsOn(":core-relocate-lettuce:shadowJar")
|
||||
val task = project(":core-relocate-lettuce").tasks.shadowJar.get()
|
||||
from(task.outputs.files.map {
|
||||
if (it.isDirectory) it else zipTree(
|
||||
it
|
||||
)
|
||||
})
|
||||
destinationDirectory = rootProject.layout.buildDirectory
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user