Merged
Conversation
d0c2649 to
2c10801
Compare
2c10801 to
96ac416
Compare
96ac416 to
602fc3f
Compare
RelocatorRemapperIterable<Relocator>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds extension functions for Iterable<Relocator> to simplify relocation operations when working with collections of relocators. The changes eliminate repetitive loops and improve code readability by providing convenient methods to relocate classes and paths using the first applicable relocator.
- Add extension functions
relocateClassandrelocatePathforIterable<Relocator> - Refactor multiple transformer classes to use the new extension functions
- Remove unused
mapPathmethod fromRelocatorRemapper
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| RelocationContext.kt | Added new extension functions for Iterable<Relocator> |
| ServiceFileTransformer.kt | Simplified relocation logic using new extensions |
| Log4j2PluginsCacheFileTransformer.kt | Replaced manual loop with extension function |
| ComponentsXmlResourceTransformer.kt | Replaced helper method with extension functions |
| ShadowCopyAction.kt | Updated to use new extension functions and removed RelocatorRemapper usage |
| RelocatorRemapper.kt | Removed unused mapPath method |
| README.md | Added changelog entry |
| shadow.api | Updated API surface with new extension functions |
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowCopyAction.kt
Show resolved
Hide resolved
.../com/github/jengelman/gradle/plugins/shadow/transformers/ComponentsXmlResourceTransformer.kt
Show resolved
Hide resolved
.../com/github/jengelman/gradle/plugins/shadow/transformers/ComponentsXmlResourceTransformer.kt
Show resolved
Hide resolved
.../com/github/jengelman/gradle/plugins/shadow/transformers/ComponentsXmlResourceTransformer.kt
Show resolved
Hide resolved
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.
Refs #1539.