Skip to content

Deprecate keepRules and keepRuleFiles in R8Spec#2120

Merged
Goooler merged 1 commit into
mainfrom
g/20260723/rename-r8-fields
Jul 24, 2026
Merged

Deprecate keepRules and keepRuleFiles in R8Spec#2120
Goooler merged 1 commit into
mainfrom
g/20260723/rename-r8-fields

Conversation

@Goooler

@Goooler Goooler commented Jul 23, 2026

Copy link
Copy Markdown
Member

Follow up #2077 (comment).


  • CHANGELOG's "Unreleased" section has been updated, if applicable.

@Goooler
Goooler force-pushed the g/20260723/rename-r8-fields branch from 2d7e005 to 86e35ed Compare July 23, 2026 09:37
@Goooler
Goooler requested a review from Copilot July 23, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 proguardRules and proguardRuleFiles on R8Spec, and deprecates keepRules / 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.

Comment thread src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/R8Spec.kt Outdated
Comment thread src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/R8Spec.kt Outdated
@Goooler
Goooler force-pushed the g/20260723/rename-r8-fields branch 2 times, most recently from 4a4870c to 6ea43ba Compare July 23, 2026 09:50
@Goooler
Goooler force-pushed the g/20260723/rename-r8-fields branch from 6ea43ba to 4b5c09e Compare July 23, 2026 10:09
@Goooler
Goooler merged commit 8a0828a into main Jul 24, 2026
8 checks passed
@Goooler
Goooler deleted the g/20260723/rename-r8-fields branch July 24, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants