-
-
Notifications
You must be signed in to change notification settings - Fork 424
Add DeduplicatingResourceTransformer to deduplicate on path and content
#1859
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
Merged
Conversation
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
a26f539 to
4ed3bf3
Compare
Goooler
reviewed
Nov 18, 2025
src/testKit/kotlin/com/github/jengelman/gradle/plugins/shadow/testkit/JarPath.kt
Outdated
Show resolved
Hide resolved
.../github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformerTest.kt
Outdated
Show resolved
Hide resolved
c23e4ab to
5353511
Compare
DeduplicatingResourceTransformer to deduplicate on path and content
5353511 to
7ee24d4
Compare
Goooler
reviewed
Nov 19, 2025
.../com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformer.kt
Outdated
Show resolved
Hide resolved
Goooler
reviewed
Nov 19, 2025
.../com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformer.kt
Outdated
Show resolved
Hide resolved
7ee24d4 to
cec54aa
Compare
d94d362 to
2c7c252
Compare
Goooler
reviewed
Nov 20, 2025
src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/BaseTransformerTest.kt
Outdated
Show resolved
Hide resolved
2c7c252 to
58c927a
Compare
Goooler
reviewed
Nov 20, 2025
...ionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/TransformersTest.kt
Outdated
Show resolved
Hide resolved
.../com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformer.kt
Outdated
Show resolved
Hide resolved
.../com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformer.kt
Outdated
Show resolved
Hide resolved
.../com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformer.kt
Outdated
Show resolved
Hide resolved
.../com/github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformer.kt
Outdated
Show resolved
Hide resolved
Goooler
reviewed
Nov 21, 2025
.../github/jengelman/gradle/plugins/shadow/transformers/DeduplicatingResourceTransformerTest.kt
Outdated
Show resolved
Hide resolved
6a61822 to
3c613f7
Compare
…testkit/JarPath.kt Co-authored-by: Copilot <[email protected]>
…nsformers/DeduplicatingResourceTransformer.kt Co-authored-by: Copilot <[email protected]>
…nsformers/DeduplicatingResourceTransformer.kt Co-authored-by: Copilot <[email protected]>
…ontainsAtLeast/Only/None
c97f9f4 to
aceaf89
Compare
…testkit/JarPath.kt Co-authored-by: Copilot <[email protected]>
…nsformers/PreserveFirstFoundResourceTransformer.kt Co-authored-by: Copilot <[email protected]>
…nsformers/DeduplicatingResourceTransformer.kt Co-authored-by: Copilot <[email protected]>
Goooler
approved these changes
Dec 5, 2025
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.
Adds a new
DeduplicatingResourceTransformerthat works different thanPreserveFirstFoundResourceTransformer.PreserveFirstFoundResourceTransformeris to preserve the first resource that matches the configured paths and ignore all other ones.DeduplicatingResourceTransformerpreserves resources by path and identical content and fails for all not explicitly allowed (excluded) resources with different content. It works intentionally against all resources.The new one is intended to guard a couple of unexpected situations:
MergeLicenseResourceTransformer(AddMergeLicenseResourceTransformerto merge licenses #1858).META-INF/x/y/pom.xml/.propertiesfiles, which can be important for dependency/license analyzation tools.Adding the functionality of
DeduplicatingResourceTransformertoPreserveFirstFoundResourceTransformerbecame a bit too difficult without breaking the existing behavior of the latter.Refs #1848.