From 1872500bb095e61b85866ac71bef394b0c8edf83 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 13 Jul 2021 08:45:22 -0700 Subject: [PATCH] Build the robolectric tests by default for debug armv7 (flutter/engine#27345) --- engine/src/flutter/shell/platform/android/BUILD.gn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/android/BUILD.gn b/engine/src/flutter/shell/platform/android/BUILD.gn index b1c694e96f..95211ca01e 100644 --- a/engine/src/flutter/shell/platform/android/BUILD.gn +++ b/engine/src/flutter/shell/platform/android/BUILD.gn @@ -543,7 +543,7 @@ action("robolectric_tests") { args += rebase_path(sources, root_build_dir) deps = [ - ":android", + ":android_jar", ":flutter_shell_java", ] } @@ -584,6 +584,12 @@ zip_bundle("android") { ] deps += [ ":flutter_shell_native" ] } + + # We only run the robolectric tests for android_debug_unopt (arm CPU), and + # the target is relatively expensive to build. + if (flutter_runtime_mode == "debug" && current_cpu == "arm") { + deps += [ ":robolectric_tests" ] + } } action("gen_android_javadoc") {