From 35186fde855b62b360b80b620e2d6723e0b2a022 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 12 Jul 2021 16:24:03 -0700 Subject: [PATCH 1/3] Build the robolectric tests by default for debug armv7 --- shell/platform/android/BUILD.gn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index b1c694e96f942..ee383e0d1e4d3 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -584,6 +584,10 @@ zip_bundle("android") { ] deps += [ ":flutter_shell_native" ] } + + if (flutter_runtime_mode == "debug" && current_cpu == "arm") { + deps += [ ":robolectric_tests" ] + } } action("gen_android_javadoc") { From 6369962819cd0b99c4f0b466aae81b29d30434d7 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 12 Jul 2021 16:29:25 -0700 Subject: [PATCH 2/3] Fix dep cycle --- shell/platform/android/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index ee383e0d1e4d3..5aa8dcebc0f52 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", ] } From 2b235923863c6ea7c41c0705446af08be551921d Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 12 Jul 2021 16:51:39 -0700 Subject: [PATCH 3/3] comment --- shell/platform/android/BUILD.gn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index 5aa8dcebc0f52..95211ca01e8c6 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -585,6 +585,8 @@ 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" ] }