Add more docs and tests for DuplicatesStrategy#1553
Merged
Conversation
658fbfb to
f557e93
Compare
9e55db3 to
1865e85
Compare
DuplicatesStrategyDuplicatesStrategy
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
d53e043 to
251d55d
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances documentation and test coverage for the DuplicatesStrategy functionality in ShadowJar tasks, following up on issue #1349. The changes improve clarity around how duplicate file handling works and provide comprehensive examples.
- Adds detailed documentation for the
getDuplicatesStrategy()method with examples of each strategy type - Adds functional tests demonstrating how to override the duplicates strategy using
eachFileandfilesMatching - Updates existing documentation to clarify interactions between
ResourceTransformers andduplicatesStrategy
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ShadowJar.kt | Adds comprehensive KDoc for getDuplicatesStrategy() method with strategy examples and transformer interaction notes |
| ServiceFileTransformerTest.kt | Adds tests for overriding EXCLUDE strategy using eachFile and filesMatching, fixes line separator handling |
| ShadowJarCachingTest.kt | Fixes test setup by using writeText instead of appendText to prevent accumulating configurations |
| merging/README.md | Enhances documentation with clearer examples of strategy override techniques and additional reference links |
| shadow.api | Updates API surface to include the newly documented getDuplicatesStrategy() method |
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.kt
Show resolved
Hide resolved
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.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.
ResourceTransformerandDuplicatesStrategy#1349.