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 } }