Don't run resource shrinking for eng builds

Since we will not shrink the resources anyway this is a waste of time

Bug: 338429777
Test: m SystemUI
Change-Id: I388f045294131a304920756607792091627921bc
This commit is contained in:
Rico Wind
2024-05-07 09:08:31 +02:00
parent bf30241e75
commit 936754c599
2 changed files with 10 additions and 6 deletions

View File

@@ -111,8 +111,12 @@ func (d *dexer) effectiveOptimizeEnabled() bool {
return BoolDefault(d.dexProperties.Optimize.Enabled, d.dexProperties.Optimize.EnabledByDefault)
}
func (d *DexProperties) resourceShrinkingEnabled() bool {
return BoolDefault(d.Optimize.Optimized_shrink_resources, Bool(d.Optimize.Shrink_resources))
func (d *DexProperties) resourceShrinkingEnabled(ctx android.ModuleContext) bool {
return !ctx.Config().Eng() && BoolDefault(d.Optimize.Optimized_shrink_resources, Bool(d.Optimize.Shrink_resources))
}
func (d *DexProperties) optimizedResourceShrinkingEnabled(ctx android.ModuleContext) bool {
return d.resourceShrinkingEnabled(ctx) && Bool(d.Optimize.Optimized_shrink_resources)
}
var d8, d8RE = pctx.MultiCommandRemoteStaticRules("d8",