Support additional optimized resource table flags
- Dominant language
- Java
- Stars
- 4k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
When building APKs with Gradle, it is possible to set `android.enableResourceOptimizations=true` which will optimize the resource table by collapsing resource names and shortening resource paths.
Reference: https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:build-system/gradle-core/src/main/java/com/android/build/gradle/internal/tasks/OptimizeResourcesTask.kt;l=165-169?q=OPTIMIZED_PROCESSED_RES
This is currently not supported in App Bundles as called out in the following issue: https://partnerissuetracker.corp.google.com/issues/217593048
**Describe the solution you'd like**
Add new fields in `ResourceOptimizations` in the bundle config that allow enabling collapse resource names and shorten resource paths.
Internally, enabling these would pass the following flags into the aapt2 command: `--collapse-resource-names` and `--shorten-resource-paths` into `aapt2`
Contributor guide
Assessment
This issue has not been assessed yet.