Merge "Revert "Use D8 by default for android_test"" am: 14b500daba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2100965 Change-Id: Ic241b9f002c1e48378fc25254890822495f0ef40 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1012,7 +1012,7 @@ func (a *AndroidTest) OverridablePropertiesDepsMutator(ctx android.BottomUpMutat
|
||||
func AndroidTestFactory() android.Module {
|
||||
module := &AndroidTest{}
|
||||
|
||||
module.Module.dexProperties.Optimize.EnabledByDefault = false
|
||||
module.Module.dexProperties.Optimize.EnabledByDefault = true
|
||||
|
||||
module.Module.properties.Instrument = true
|
||||
module.Module.properties.Supports_static_instrumentation = true
|
||||
@@ -1066,7 +1066,6 @@ func (a *AndroidTestHelperApp) InstallInTestcases() bool {
|
||||
func AndroidTestHelperAppFactory() android.Module {
|
||||
module := &AndroidTestHelperApp{}
|
||||
|
||||
// TODO(b/192032291): Disable by default after auditing downstream usage.
|
||||
module.Module.dexProperties.Optimize.EnabledByDefault = true
|
||||
|
||||
module.Module.properties.Installable = proptools.BoolPtr(true)
|
||||
|
@@ -36,8 +36,8 @@ type DexProperties struct {
|
||||
Main_dex_rules []string `android:"path"`
|
||||
|
||||
Optimize struct {
|
||||
// If false, disable all optimization. Defaults to true for android_app and
|
||||
// android_test_helper_app modules, false for android_test, java_library, and java_test modules.
|
||||
// If false, disable all optimization. Defaults to true for android_app and android_test
|
||||
// modules, false for java_library and java_test modules.
|
||||
Enabled *bool
|
||||
// True if the module containing this has it set by default.
|
||||
EnabledByDefault bool `blueprint:"mutated"`
|
||||
|
@@ -723,9 +723,9 @@ func TestDefaults(t *testing.T) {
|
||||
t.Errorf("atestNoOptimize should not optimize APK")
|
||||
}
|
||||
|
||||
atestDefault := ctx.ModuleForTests("atestDefault", "android_common").MaybeRule("d8")
|
||||
atestDefault := ctx.ModuleForTests("atestDefault", "android_common").MaybeRule("r8")
|
||||
if atestDefault.Output == nil {
|
||||
t.Errorf("atestDefault should not optimize APK")
|
||||
t.Errorf("atestDefault should optimize APK")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user