Skip to content

Enable R8 obfuscation for production builds - #5921

Draft
siddh1004 wants to merge 8 commits into
masterfrom
SIMPLEMOB-59
Draft

Enable R8 obfuscation for production builds#5921
siddh1004 wants to merge 8 commits into
masterfrom
SIMPLEMOB-59

Conversation

@siddh1004

@siddh1004 siddh1004 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Jira: SIMPLEMOB-59

View Jira ticket

Google Play reported 0% obfuscation for the 2026.09.03 release.

Production builds run R8, but the global -dontobfuscate rule in proguard-rules.pro prevented any classes from being obfuscated.

This change enables R8 obfuscation while preserving the names of generated Room DAO implementation classes, which are required by the SQL performance profiling instrumentation.

Changes

  • Removed the global -dontobfuscate rule.
  • Added a targeted R8 rule:
    -keepnames class **_RoomDao_Impl
  • Updated the ProGuard comments to document why Room DAO names need to remain unchanged.

Why

The SQL performance profiler uses generated Room DAO class names when reporting database operations to Sentry. Keeping these names allows the existing performance profiling functionality to continue identifying DAO operations after R8 obfuscation.

Validation

  • Verified that regular application classes are now obfuscated in the R8 mapping.
  • Verified that generated *_RoomDao_Impl classes retain their original names.
  • Successfully generated the production release AAB with R8 enabled.
  • Successfully ran the Room DAO transformation task.
  • testQaDebugUnitTest: 2380/2380 tests passed
  • lint: passed
  • git diff --check: passed

The SQL performance profiler itself was not tested end-to-end on a device as part of this change.

renovate Bot and others added 8 commits September 3, 2026 14:57
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [com.android.lint](https://developer.android.com/studio/build)
([source](https://android.googlesource.com/platform/tools/base)) |
`9.3.2` → `9.4.0` |
![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.lint:com.android.lint.gradle.plugin/9.4.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.lint:com.android.lint.gradle.plugin/9.3.2/9.4.0?slim=true)
|
| [com.android.library](https://developer.android.com/studio/build)
([source](https://android.googlesource.com/platform/tools/base)) |
`9.3.2` → `9.4.0` |
![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.library:com.android.library.gradle.plugin/9.4.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.library:com.android.library.gradle.plugin/9.3.2/9.4.0?slim=true)
|
| [com.android.application](https://developer.android.com/studio/build)
([source](https://android.googlesource.com/platform/tools/base)) |
`9.3.2` → `9.4.0` |
![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.application:com.android.application.gradle.plugin/9.4.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.application:com.android.application.gradle.plugin/9.3.2/9.4.0?slim=true)
|

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/simpledotorg/simple-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC40OS4wIiwidXBkYXRlZEluVmVyIjoiNDQuNTcuMyIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: sagarwal <sagarwal@rtsl.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant