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
This commit is contained in:
Rico Wind 2023-08-01 14:38:36 +02:00
parent 20bb0f80d7
commit 21862285ac

View file

@ -256,7 +256,8 @@ func aapt2Link(ctx android.ModuleContext,
var aapt2ConvertRule = pctx.AndroidStaticRule("aapt2Convert", var aapt2ConvertRule = pctx.AndroidStaticRule("aapt2Convert",
blueprint.RuleParams{ 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}"}, CommandDeps: []string{"${config.Aapt2Cmd}"},
}, "format", }, "format",
) )