Skip to content

Commit 6797655

Browse files
authored
select at.yark.lz4:lz4-java:1.8.1 when org.lz4:lz4-java:1.8.1 redirects to it.
1 parent ecc6cb8 commit 6797655

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test-consumer/build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,15 @@ tasks.register("verifyResolution") {
8282
tasks.check {
8383
dependsOn("verifyResolution")
8484
}
85+
86+
87+
// Handle lz4-java redirect capability conflict:
88+
// Sonatype added a redirect from org.lz4:lz4-java:1.8.1 -> at.yawk.lz4:lz4-java:1.8.1 to address CVE-2025-12183.
89+
// Both artifacts declare the same capability, causing a conflict when upgrading from Kafka's org.lz4:lz4-java:1.8.0.
90+
// This resolution strategy tells Gradle to automatically select the highest version when this conflict occurs.
91+
configurations.all {
92+
resolutionStrategy.capabilitiesResolution.withCapability("org.lz4:lz4-java") {
93+
select("at.yawk.lz4:lz4-java:1.8.1")
94+
because("Both org.lz4 and at.yawk.lz4 provide lz4-java due to Sonatype redirect")
95+
}
96+
}

0 commit comments

Comments
 (0)