Chromium Code Reviews| Index: blimp/BUILD.gn |
| diff --git a/blimp/BUILD.gn b/blimp/BUILD.gn |
| index 01b232ab2761946bf2a1c934618163a4bf8b0acd..9da0a633ab0af4dc6d7812f30c6987ccbde94d1b 100644 |
| --- a/blimp/BUILD.gn |
| +++ b/blimp/BUILD.gn |
| @@ -6,6 +6,11 @@ import("//build/config/chrome_build.gni") |
| import("//build/config/ui.gni") |
| import("//testing/test.gni") |
| +if (is_android) { |
| + import("//build/config/android/config.gni") |
| + import("//build/config/android/rules.gni") |
| +} |
| + |
| # Convenience meta-target for all of Blimp's production & test code. |
| group("blimp") { |
| # In spite of the name, this really just means that non-test targets |
| @@ -73,6 +78,35 @@ test("blimp_unittests") { |
| if (is_linux) { |
| deps += [ "//blimp/engine:unit_tests" ] |
| } |
| + |
| + if (is_android) { |
| + deps += [ ":blimp_unittests_java_deps" ] |
| + } |
| +} |
| + |
| +if (is_android) { |
| + # This is the list of targets that the tests need to depend on in order to add |
| + # the java classes for their native counterparts to the test apk. |
| + # While we could directly include them in the test target, but in order to |
| + # keep the visibility of the //blimp/client/core:core_java target restricted, |
| + # we make it visible to this group (which is testonly) and depend on this |
| + # group instead. |
| + # We could not add ":blimp_unittests" to the visibility list of |
| + # //blimp/client/core:core_java, since the targets that actually need to |
| + # depend on it are generated by the test template (see testing/test.gni). So |
| + # it was better to add this indirection and expose it to this testonly target, |
| + # which can be used in this file only. |
|
Khushal
2016/08/23 05:14:34
Had to do the JNI hookup for moving the BlimpCompo
|
| + java_group("blimp_unittests_java_deps") { |
| + testonly = true |
| + visibility = [ ":*" ] |
| + |
| + deps = [ |
| + "//base:base_java", |
| + "//blimp/client/core:core_java", |
| + "//net/android:net_java", |
| + "//ui/android:ui_java", |
| + ] |
| + } |
| } |
| if (is_linux) { |