Skip to content

Commit 959bc66

Browse files
committed
Add Shadow plugin configuration, exclude SLF4J from Lettuce dependency, and enhance Maven publishing setup
1 parent b31e5c6 commit 959bc66

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

build.gradle.kts

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ version = findProperty("version") as String
1010

1111

1212
dependencies {
13-
// Lettuce Redis client
14-
implementation("io.lettuce:lettuce-core:7.2.1.RELEASE")
13+
implementation("io.lettuce:lettuce-core:7.2.1.RELEASE") {
14+
exclude("org.slf4j")
15+
}
1516

1617
testImplementation(kotlin("test"))
1718
testImplementation("org.testcontainers:testcontainers-junit-jupiter:2.0.3")
@@ -20,7 +21,22 @@ dependencies {
2021
testImplementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0")
2122
}
2223

24+
tasks.shadowJar {
25+
relocationPrefix = "dev.slne.redis.libs"
26+
enableAutoRelocation = true
27+
}
28+
29+
shadow {
30+
addShadowVariantIntoJavaComponent = false
31+
}
32+
2333
publishing {
34+
publications {
35+
create<MavenPublication>("shadow") {
36+
from(components["shadow"])
37+
}
38+
}
39+
2440
repositories {
2541
slneReleases()
2642
}
@@ -30,6 +46,16 @@ tasks.test {
3046
useJUnitPlatform()
3147
}
3248

33-
kotlin {
34-
jvmToolchain(21)
49+
java {
50+
withSourcesJar()
51+
withJavadocJar()
52+
}
53+
54+
afterEvaluate {
55+
tasks.named("publishPluginMavenPublicationToMaven-releasesRepository") {
56+
enabled = false
57+
}
58+
tasks.named("publishPluginMavenPublicationToMavenLocal") {
59+
enabled = false
60+
}
3561
}

0 commit comments

Comments
 (0)