bundletool
bundletool copied to clipboard
Support additional optimized resource table flags
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