Add functional tests for non-jar exclude and custom r8 args - #2295
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new passCustomR8Args functional test’s expectations don’t match Shadow’s default R8 behavior and are likely incorrect/flaky without adjustment.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds functional-test coverage for two edge cases in Shadow’s functional test suite: excluding a transitive dependency that has no JAR artifact (POM-only), and configuring custom R8 command-line arguments during minimization.
Changes:
- Extend the functional-test Maven repo builder to publish POM-only modules (
pomModule/PomModule). - Add a Filtering functional test that excludes a transitive POM-only dependency.
- Add an R8 minimization functional test intended to validate custom R8 args handling (currently with an assertion that should be adjusted; see review comment).
File summaries
| File | Description |
|---|---|
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/util/AppendableMavenRepository.kt | Adds support for publishing POM-only modules in the test Maven repository. |
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/BasePluginTest.kt | Extends the shared local Maven repo fixture with a module that depends on a POM-only dependency. |
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt | Adds a test that applies an exclude rule targeting a transitive POM-only dependency. |
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/R8MinimizationTest.kt | Adds a test for custom R8 args (needs a deterministic assertion to avoid flakiness). |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Goooler
force-pushed
the
g/20260909/add-tests
branch
from
September 9, 2026 09:58
318527e to
3361065
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Goooler
force-pushed
the
g/20260909/add-tests
branch
from
September 9, 2026 10:00
f40f99b to
5a018f0
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.
Refs #2293.