-
Notifications
You must be signed in to change notification settings - Fork 415
Support disabling of string constant remapping #1401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
6e070d3
to
7ab3258
Compare
5042c45
to
233e9e0
Compare
# Conflicts: # src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/RelocationTest.kt
ad4a70a
to
de55c7b
Compare
# Conflicts: # api/shadow.api # docs/changes/README.md
There was a problem hiding this comment.
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 adds support for disabling string constant remapping during relocation in the Shadow plugin. The feature allows users to skip relocating string literals while still relocating class names and paths, which is useful when string constants should remain unchanged even when the referenced classes are relocated.
Key changes:
- Added a new
skipStringLiteral
boolean property to theRelocator
interface andSimpleRelocator
implementation - Modified the remapping logic to conditionally skip string literal relocation based on this flag
- Added comprehensive tests to verify the functionality works correctly
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/Relocator.kt |
Added skipStringLiteral property to the interface |
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator.kt |
Implemented skipStringLiteral property with proper equals/hashCode integration |
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/RelocatorRemapper.kt |
Modified remapping logic to check skipStringLiteral flag before processing string literals |
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/RelocationTest.kt |
Added parameterized tests to verify string literal remapping can be disabled |
docs/changes/README.md |
Updated changelog with the new feature |
api/shadow.api |
Updated API definition with new property and constructor |
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator.kt
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.