Allow modules to disable stripping when dexpreopting

Add a no_stripping property and pass it to dexpreopt to disable
stripping for a module.

Bug: 122610462
Test: dexpreopt_test.go
Change-Id: I5a4b005633bb8b1ea373e9eeb420aa0999de17ab
This commit is contained in:
Colin Cross
2019-01-09 21:09:14 -08:00
parent ed918b77bb
commit 8c6d250c0b
4 changed files with 63 additions and 40 deletions

View File

@@ -43,6 +43,9 @@ type DexpreoptProperties struct {
// true.
Enabled *bool
// If true, never strip the dex files from the final jar when dexpreopting. Defaults to false.
No_stripping *bool
// If true, generate an app image (.art file) for this module.
App_image *bool
@@ -171,6 +174,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
NoCreateAppImage: !BoolDefault(d.dexpreoptProperties.Dex_preopt.App_image, true),
ForceCreateAppImage: BoolDefault(d.dexpreoptProperties.Dex_preopt.App_image, false),
NoStripping: Bool(d.dexpreoptProperties.Dex_preopt.No_stripping),
StripInputPath: dexJarFile.String(),
StripOutputPath: strippedDexJarFile.String(),
}