Skip to content

Replace Commons IO and Codec usages - #2136

Merged
Goooler merged 1 commit into
mainfrom
g/20260730/remove-deps
Jul 30, 2026
Merged

Replace Commons IO and Codec usages#2136
Goooler merged 1 commit into
mainfrom
g/20260730/remove-deps

Conversation

@Goooler

@Goooler Goooler commented Jul 30, 2026

Copy link
Copy Markdown
Member

  • CHANGELOG's "Unreleased" section has been updated, if applicable.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + HexFormat and added a unit test for sha256Hex().
  • Replaced CloseShieldOutputStream usage 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
Goooler enabled auto-merge (squash) July 30, 2026 11:52
@Goooler
Goooler disabled auto-merge July 30, 2026 11:54
@Goooler
Goooler merged commit 87ab2a1 into main Jul 30, 2026
9 checks passed
@Goooler
Goooler deleted the g/20260730/remove-deps branch July 30, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants