Fix excluding dependencies whose versions contain +#1597
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
9f75519 to
17426fe
Compare
17426fe to
1b20a46
Compare
1b20a46 to
6969486
Compare
DependencyFilterDependencyFilter
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in DependencyFilter where dependencies with versions containing the + character (e.g., 1.0.0+1) couldn't be properly excluded because the + character was being interpreted as a regex quantifier instead of a literal character.
- Updates dependency matching logic to check for exact string matches before falling back to regex matching
- Adds a functional test to verify the fix works for versions containing
+ - Updates the changelog to document the bug fix
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/DependencyFilter.kt | Refactors dependency matching to prioritize exact string matches over regex matching to handle special characters |
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt | Adds functional test for filtering dependencies with versions containing + character |
| docs/changes/README.md | Documents the bug fix in the changelog |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/DependencyFilter.kt
Show resolved
Hide resolved
DependencyFilter+
a881636 to
57a1f88
Compare
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.
Closes #671.