[AndroidWebViewShell] Add MediaStream API layout tests.
[chromium-blink-merge.git] / remoting / remoting_android.gypi
blob2f3f5572b23aa2008eabbd6cb1b8418f24ba87ce
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.
6   'conditions': [
7     ['OS=="android"', {
8       'targets': [
9         {
10           'target_name': 'remoting_jni_headers',
11           'type': 'none',
12           'sources': [
13             'android/java/src/org/chromium/chromoting/jni/Client.java',
14             'android/java/src/org/chromium/chromoting/jni/JniInterface.java',
15           ],
16           'variables': {
17             'jni_gen_package': 'remoting',
18           },
19           'includes': [ '../build/jni_generator.gypi' ],
20         },  # end of target 'remoting_jni_headers'
21         {
22           'target_name': 'remoting_client_jni',
23           'type': 'shared_library',
24           'dependencies': [
25             'remoting_base',
26             'remoting_client',
27             'remoting_jni_headers',
28             'remoting_protocol',
29             '../google_apis/google_apis.gyp:google_apis',
30             '../ui/events/events.gyp:dom_keycode_converter',
31             '../ui/gfx/gfx.gyp:gfx',
32           ],
33           'sources': [
34             'client/jni/android_keymap.cc',
35             'client/jni/android_keymap.h',
36             'client/jni/chromoting_jni_instance.cc',
37             'client/jni/chromoting_jni_instance.h',
38             'client/jni/chromoting_jni_runtime.cc',
39             'client/jni/chromoting_jni_runtime.h',
40             'client/jni/jni_client.cc',
41             'client/jni/jni_client.h',
42             'client/jni/jni_frame_consumer.cc',
43             'client/jni/jni_frame_consumer.h',
44             'client/jni/remoting_jni_onload.cc',
45             'client/jni/remoting_jni_registrar.cc',
46             'client/jni/remoting_jni_registrar.h',
47           ],
48         },  # end of target 'remoting_client_jni'
49         {
50           'target_name': 'remoting_android_resources',
51           'type': 'none',
52           'copies': [
53             {
54               'destination': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res/raw',
55               'files': [
56                 '<(SHARED_INTERMEDIATE_DIR)/remoting/credits.html',
57                 'webapp/base/html/credits_css.css',
58                 'webapp/base/html/main.css',
59                 'webapp/base/js/credits_js.js',
60               ],
61             },
62           ],
63           'dependencies': [
64             'remoting_client_credits',
65           ],
66         },  # end of target 'remoting_android_resources'
67         {
68           'target_name': 'remoting_apk_manifest',
69           'type': 'none',
70           'sources': [
71             'android/java/AndroidManifest.xml.jinja2',
72           ],
73           'rules': [{
74             'rule_name': 'generate_manifest',
75             'extension': 'jinja2',
76             'inputs': [
77               '<(remoting_localize_path)',
78               '<(branding_path)',
79             ],
80             'outputs': [
81               '<(SHARED_INTERMEDIATE_DIR)/remoting/android/<(RULE_INPUT_ROOT)',
82             ],
83             'action': [
84               'python', '<(remoting_localize_path)',
85               '--variables', '<(branding_path)',
86               '--template', '<(RULE_INPUT_PATH)',
87               '--locale_output', '<@(_outputs)',
88               '--define', 'ENABLE_CARDBOARD=<(enable_cardboard)',
89               'en',
90             ],
91           }],
92         },  # end of target 'remoting_apk_manifest'
93         {
94           'target_name': 'remoting_android_client_java',
95           'type': 'none',
96           'variables': {
97             'java_in_dir': 'android/java',
98             'has_java_resources': 1,
99             'R_package': 'org.chromium.chromoting',
100             'R_package_relpath': 'org/chromium/chromoting',
101             'res_extra_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res' ],
102             'res_extra_files': [
103               '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)" resources/remoting_strings.grd)',
104             ],
105           },
106           'dependencies': [
107             'remoting_android_resources',
108             '../base/base.gyp:base_java',
109             '../ui/android/ui_android.gyp:ui_java',
110             '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
111             '../third_party/android_tools/android_tools.gyp:android_support_v7_mediarouter_javalib',
112             '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
113             '../third_party/android_tools/android_tools.gyp:google_play_services_javalib',
114             '../third_party/cardboard-java/cardboard.gyp:cardboard_jar',
115           ],
116           'includes': [ '../build/java.gypi' ],
117           'conditions' : [
118             ['enable_cast==1', {
119               'variables': {
120                 'additional_src_dirs': [
121                   'android/cast',
122                 ],
123               },
124             }],
125           ],
126         },
127         {
128           'target_name': 'remoting_apk',
129           'type': 'none',
130           'dependencies': [
131             'remoting_apk_manifest',
132             'remoting_client_jni',
133             'remoting_android_client_java',
134           ],
135           'variables': {
136             'apk_name': '<!(python <(version_py_path) -f <(branding_path) -t "@APK_FILE_NAME@")',
137             'android_app_version_name': '<(version_full)',
138             'android_app_version_code': '<!(python tools/android_version.py <(android_app_version_name))',
139             'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/AndroidManifest.xml',
140             'java_in_dir': 'android/apk',
141             'native_lib_target': 'libremoting_client_jni',
142           },
143           'includes': [ '../build/java_apk.gypi' ],
144         },  # end of target 'remoting_apk'
145         {
146           'target_name': 'remoting_test_apk',
147           'type': 'none',
148           'dependencies': [
149             '../base/base.gyp:base_java_test_support',
150             'remoting_android_client_java',
151           ],
152           'variables': {
153             'apk_name': 'ChromotingTest',
154             'java_in_dir': 'android/javatests',
155             'is_test_apk': 1,
156           },
157           'includes': [ '../build/java_apk.gypi' ],
158         },  # end of target 'remoting_test_apk'
159       ], # end of 'targets'
160     }],  # 'OS=="android"'
162     ['OS=="android"', {
163       'targets': [
164         {
165           'target_name': 'remoting_unittests_apk',
166           'type': 'none',
167           'dependencies': [
168             'remoting_unittests',
169           ],
170           'variables': {
171             'test_suite_name': 'remoting_unittests',
172           },
173           'includes': [ '../build/apk_test.gypi' ],
174         },
175       ],
176     }],  # 'OS=="android"
177   ],  # end of 'conditions'