Deprecate keepRules and keepRuleFiles in R8Spec#2120
Merged
Conversation
Goooler
force-pushed
the
g/20260723/rename-r8-fields
branch
from
July 23, 2026 09:37
2d7e005 to
86e35ed
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames R8Spec’s user-facing “keep rules” configuration to “ProGuard rules” naming, while keeping the old properties as deprecated aliases and updating tests/docs to use the new names.
Changes:
- Introduces
proguardRulesandproguardRuleFilesonR8Spec, and deprecateskeepRules/keepRuleFiles. - Updates R8 minimization logic and test coverage to use the new property names.
- Updates documentation and the Kotlin ABI dump to reflect the public API change.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/MinimizeSpecsTest.kt | Updates unit test expectations to use proguardRules/proguardRuleFiles. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/R8Spec.kt | Adds new proguard* properties and deprecates keep* aliases. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/R8Minimizer.kt | Switches minimizer to read rules from proguard* properties and renames helper methods. |
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/DefaultR8Spec.kt | Updates default spec implementation to provide proguard* properties. |
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/MinimizeTest.kt | Renames functional test and updates DSL usage to proguardRules. |
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/CachingTest.kt | Updates caching test and DSL usage to proguardRuleFiles and proguardRules. |
| docs/configuration/minimizing/README.md | Updates user docs examples to use proguardRules/proguardRuleFiles. |
| docs/changes/README.md | Adds an Unreleased changelog entry documenting the deprecation. |
| api/shadow.api | Updates ABI dump for the R8Spec public API changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Goooler
force-pushed
the
g/20260723/rename-r8-fields
branch
2 times, most recently
from
July 23, 2026 09:50
4a4870c to
6ea43ba
Compare
1 task
Goooler
force-pushed
the
g/20260723/rename-r8-fields
branch
from
July 23, 2026 10:09
6ea43ba to
4b5c09e
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.
Follow up #2077 (comment).