[Cherry-pick to branch-1.3] [#11480] fix(build): bump slf4j-api to 2.0.17 to eliminate duplicate jars in distribution (#11484) - #11507
Merged
Conversation
…jars in distribution (#11484) ### What changes were proposed in this pull request? - Bumps `slf4j = "2.0.16"` → `"2.0.17"` in `gradle/libs.versions.toml` - Removes the previous `resolutionStrategy.force` workaround from `build.gradle.kts` ### Why are the changes needed? `distribution/package/libs/` contained two versions of `slf4j-api` simultaneously: - `slf4j-api-2.0.16.jar` — from modules that only see the catalog-pinned version - `slf4j-api-2.0.17.jar` — from modules using `bundles.log4j` (`core`, `server`, `server-common`), where `log4j-slf4j2-impl:2.25.4` declares a transitive dependency on `slf4j-api:2.0.17` Because the `assembleDistribution` copy task collects `runtimeClasspath` from each subproject independently, and the two versions have different filenames, `DuplicatesStrategy.EXCLUDE` cannot deduplicate them. Bumping the catalog entry to `2.0.17` (which `log4j-slf4j2-impl:2.25.4` already requires) makes all subprojects naturally converge to the same version through Gradle's normal conflict resolution, so only `slf4j-api-2.0.17.jar` ends up in the distribution. Fix: #11480 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - `./gradlew compileJava -PskipITs --parallel` — BUILD SUCCESSFUL (all 456 tasks) - `./gradlew test -PskipITs --parallel` — BUILD SUCCESSFUL (all 763 tasks, 29 min) - Verified `distribution/package/libs/` now contains only `slf4j-api-2.0.17.jar` - Verified `:common:dependencies` resolves directly to `2.0.17` without any `->` upgrade --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
Code Coverage Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick Information:
branch-1.3