Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 97a9903c authored by Jared Duke's avatar Jared Duke
Browse files

Refine VisibleForTesting proguard rules

Both androidx (Jetpack) and com.google.common (Guava) define
@VisibleForTesting annotations. These are used within these libraries
for test purposes, but have also been adopted throughout the platform
for platform-specific test code. Consequently, the current keep
rules end up keeping not only platform test code, but also library test
code that isn't actually needed.

Refine these rules by restricting VisibleForTesting-annotated keep
rules to include code *outside* of Jetpack/Guava. A longer term
solution will involve migrating away from these annotations toward
the platform-defined @TestApi and internal @VisibleForTesting variants.
Note that platform code using the androidx* and c.g.common*-defined
@VisibleForTesting annotations will still be kept.

This saves about ~11MB of dex code from platform apps/services.

Bug: 239961360
Test: m + validate dex changes for shrunk packages (SystemUI/Launcher)
Change-Id: Icd70090e615b72a2cfb9ce8c43edb17cb46e05e2
parent f6879451
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment