Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / mojo / android / BUILD.gn
blob684f54748af0ca1d82c8cadd4f7faa2ca5cef95c
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/android/rules.gni")
7 group("android") {
8   testonly = true
9   deps = [
10     ":system_java",
11     ":mojo_javatests",
12     ":mojo_test_apk",
13   ]
16 generate_jni("jni_headers") {
17   sources = [
18     "javatests/src/org/chromium/mojo/MojoTestCase.java",
19     "javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java",
20   ]
21   deps = [
22     ":system_java_jni_headers",
23   ]
25   jni_package = "mojo"
28 generate_jni("system_java_jni_headers") {
29   sources = [
30     "system/src/org/chromium/mojo/system/impl/CoreImpl.java",
31     "system/src/org/chromium/mojo/system/impl/BaseRunLoop.java",
32   ]
34   jni_package = "mojo"
37 source_set("libsystem_java") {
38   sources = [
39     "system/base_run_loop.cc",
40     "system/base_run_loop.h",
41     "system/core_impl.cc",
42     "system/core_impl.h",
43   ]
45   deps = [
46     ":system_java_jni_headers",
47     "//base",
48     "//mojo/environment:chromium",
49     "//mojo/common:common",
50     "//third_party/mojo/src/mojo/edk/system",
51     "//third_party/mojo/src/mojo/public/cpp/environment",
52   ]
55 android_library("system_java") {
56   java_files = [
57     "system/src/org/chromium/mojo/system/impl/BaseRunLoop.java",
58     "system/src/org/chromium/mojo/system/impl/CoreImpl.java",
59     "system/src/org/chromium/mojo/system/impl/DataPipeConsumerHandleImpl.java",
60     "system/src/org/chromium/mojo/system/impl/DataPipeProducerHandleImpl.java",
61     "system/src/org/chromium/mojo/system/impl/HandleBase.java",
62     "system/src/org/chromium/mojo/system/impl/MessagePipeHandleImpl.java",
63     "system/src/org/chromium/mojo/system/impl/SharedBufferHandleImpl.java",
64     "system/src/org/chromium/mojo/system/impl/UntypedHandleImpl.java",
65   ]
67   deps = [
68     "//base:base_java",
69     "//third_party/mojo/src/mojo/public/java:system",
70   ]
73 android_library("mojo_javatests") {
74   testonly = true
75   java_files = [
76     "javatests/src/org/chromium/mojo/HandleMock.java",
77     "javatests/src/org/chromium/mojo/MojoTestCase.java",
78     "javatests/src/org/chromium/mojo/TestUtils.java",
79     "javatests/src/org/chromium/mojo/bindings/BindingsHelperTest.java",
80     "javatests/src/org/chromium/mojo/bindings/BindingsTest.java",
81     "javatests/src/org/chromium/mojo/bindings/BindingsTestUtils.java",
82     "javatests/src/org/chromium/mojo/bindings/BindingsVersioningTest.java",
83     "javatests/src/org/chromium/mojo/bindings/CallbacksTest.java",
84     "javatests/src/org/chromium/mojo/bindings/ConnectorTest.java",
85     "javatests/src/org/chromium/mojo/bindings/ExecutorFactoryTest.java",
86     "javatests/src/org/chromium/mojo/bindings/InterfacesTest.java",
87     "javatests/src/org/chromium/mojo/bindings/MessageHeaderTest.java",
88     "javatests/src/org/chromium/mojo/bindings/ReadAndDispatchMessageTest.java",
89     "javatests/src/org/chromium/mojo/bindings/RouterTest.java",
90     "javatests/src/org/chromium/mojo/bindings/SerializationTest.java",
91     "javatests/src/org/chromium/mojo/bindings/test/mojom/mojo/IntegrationTestInterfaceTestHelper.java",
92     "javatests/src/org/chromium/mojo/bindings/ValidationTest.java",
93     "javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java",
94     "javatests/src/org/chromium/mojo/bindings/ValidationTestUtilTest.java",
95     "javatests/src/org/chromium/mojo/HandleMock.java",
96     "javatests/src/org/chromium/mojo/MojoTestCase.java",
97     "javatests/src/org/chromium/mojo/TestUtils.java",
98     "javatests/src/org/chromium/mojo/system/impl/CoreImplTest.java",
99   ]
101   deps = [
102     ":system_java",
103     "//base:base_java",
104     "//base:base_java_test_support",
105     "//third_party/mojo/src/mojo/public/interfaces/bindings/tests:test_interfaces_java",
106     "//third_party/mojo/src/mojo/public/java:bindings",
107     "//third_party/mojo/src/mojo/public/java:system",
108   ]
111 shared_library("mojo_java_unittests") {
112   testonly = true
114   sources = [
115     "javatests/init_library.cc",
116     "javatests/mojo_test_case.cc",
117     "javatests/mojo_test_case.h",
118     "javatests/validation_test_util.cc",
119     "javatests/validation_test_util.h",
120   ]
122   deps = [
123     ":jni_headers",
124     ":libsystem_java",
125     ":system_java_jni_headers",
126     "//base",
127     "//base/test/:test_support",
128     "//mojo/common",
129     "//third_party/mojo/src/mojo/edk/system",
130     "//third_party/mojo/src/mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils",
131     "//third_party/mojo/src/mojo/public/cpp/test_support:test_utils",
132     "//third_party/mojo/src/mojo/public/cpp/environment",
133   ]
134   defines = [ "UNIT_TEST" ]
137 android_apk("mojo_test_apk") {
138   testonly = true
139   deps = [
140     ":mojo_javatests",
141     ":mojo_java_unittests",
142     ":system_java",
143     "//base:base_java",
144     "//third_party/mojo/src/mojo/public/java:bindings",
145     "//third_party/mojo/src/mojo/public/interfaces/bindings/tests:test_interfaces",
146   ]
147   native_libs = [ "libmojo_java_unittests.so" ]
148   apk_name = "MojoTest"
149   android_manifest = "javatests/AndroidManifest.xml"