From d16602a06d228b32d793d35ee78e63586837c446 Mon Sep 17 00:00:00 2001 From: MiniDay <372403923@qq.com> Date: Thu, 10 Jul 2025 20:36:26 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E5=9C=A8=20Velocity=20=E4=B8=AD?= =?UTF-8?q?=E5=BC=95=E5=85=A5=20relocate=20=E5=90=8E=E7=9A=84=20netty?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2=E4=BE=9D=E8=B5=96=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core-velocity/build.gradle.kts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core-velocity/build.gradle.kts b/core-velocity/build.gradle.kts index 1aada52..96b672d 100644 --- a/core-velocity/build.gradle.kts +++ b/core-velocity/build.gradle.kts @@ -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 } }