Enable compact entries for resource shrunken apps
For SystemUIGoogle this is a 2.3 MB reduction (17* of resources arsc) and for Traceur it is a 500k reduction (22% of resources.arsc)
Bug: 294016857
Test: Existing
Ignore-AOSP-First: The resource system support for this is not in AOSP yet
Change-Id: I513078406494ad354c255afa0e829cbe10a9b07a
diff --git a/java/aapt2.go b/java/aapt2.go
index 7845a0b..abe154e 100644
--- a/java/aapt2.go
+++ b/java/aapt2.go
@@ -256,7 +256,8 @@
var aapt2ConvertRule = pctx.AndroidStaticRule("aapt2Convert",
blueprint.RuleParams{
- Command: `${config.Aapt2Cmd} convert --output-format $format $in -o $out`,
+ Command: `${config.Aapt2Cmd} convert --enable-compact-entries ` +
+ `--output-format $format $in -o $out`,
CommandDeps: []string{"${config.Aapt2Cmd}"},
}, "format",
)