diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index b1c694e96f942885a0fc0464a6a0bfa0f010f551..95211ca01e8c62c19d7f6bc054543339ea23bee5 100644 --- a/shell/platform/android/BUILD.gn +++ b/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") {