Replace Commons IO and Codec usages - #2136
Merged
Merged
Conversation
Goooler
commented
Jul 30, 2026
Member
- CHANGELOG's "Unreleased" section has been updated, if applicable.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes runtime dependencies on Apache Commons Codec and Commons IO by replacing their usages with equivalent JDK implementations, and updates tests and dependency declarations accordingly.
Changes:
- Replaced SHA-256 hashing implementation with
MessageDigest+HexFormatand added a unit test forsha256Hex(). - Replaced
CloseShieldOutputStreamusage from Commons IO with a small local implementation to prevent closing the underlying JAR output stream. - Removed Commons Codec/IO from Gradle dependency declarations and documented the change in the changelog.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformer.kt | Replaces Commons Codec hashing with a JDK-based SHA-256 hex implementation. |
| src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformerTest.kt | Adds coverage for the new sha256Hex() behavior. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/Log4j2PluginsCacheFileTransformer.kt | Replaces Commons IO CloseShieldOutputStream with a local close-shielding wrapper. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator.kt | Replaces Commons IO path parsing with simple string-based splitting. |
| build.gradle.kts | Removes Commons Codec/IO dependencies from the build. |
| gradle/libs.versions.toml | Removes version catalog entries for Commons Codec/IO. |
| docs/changes/README.md | Adds a changelog entry describing the dependency removal. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Goooler
enabled auto-merge (squash)
July 30, 2026 11:52
Goooler
disabled auto-merge
July 30, 2026 11:54
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.