cleanup: pass string as const reference from c/b/extension
[chromium-blink-merge.git] / remoting / remoting_android.gypi
blobd0865d6d2c2a1d2028fbfa72edc5ddea7e0a3a24
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/JniInterface.java',
14           ],
15           'variables': {
16             'jni_gen_package': 'remoting',
17             'jni_generator_ptr_type': 'long',
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           ],
31           'sources': [
32             'client/jni/android_keymap.cc',
33             'client/jni/android_keymap.h',
34             'client/jni/chromoting_jni_instance.cc',
35             'client/jni/chromoting_jni_instance.h',
36             'client/jni/chromoting_jni_onload.cc',
37             'client/jni/chromoting_jni_runtime.cc',
38             'client/jni/chromoting_jni_runtime.h',
39             'client/jni/jni_frame_consumer.cc',
40             'client/jni/jni_frame_consumer.h',
41           ],
42         },  # end of target 'remoting_client_jni'
43         {
44           'target_name': 'remoting_android_resources',
45           'type': 'none',
46           'copies': [
47             {
48               'destination': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res/drawable',
49               'files': [
50                 'resources/chromoting128.png',
51                 'resources/icon_host.png',
52               ],
53             },
54           ],
55         },  # end of target 'remoting_android_resources'
56         {
57           'target_name': 'remoting_apk_manifest',
58           'type': 'none',
59           'sources': [
60             'android/java/AndroidManifest.xml.jinja2',
61           ],
62           'rules': [{
63             'rule_name': 'generate_manifest',
64             'extension': 'jinja2',
65             'inputs': [
66               '<(remoting_localize_path)',
67               '<(branding_path)',
68             ],
69             'outputs': [
70               '<(SHARED_INTERMEDIATE_DIR)/remoting/android/<(RULE_INPUT_ROOT)',
71             ],
72             'action': [
73               'python', '<(remoting_localize_path)',
74               '--variables', '<(branding_path)',
75               '--template', '<(RULE_INPUT_PATH)',
76               '--locale_output', '<@(_outputs)',
77               'en',
78             ],
79           }],
80         },  # end of target 'remoting_apk_manifest'
81         {
82           'target_name': 'remoting_android_client_java',
83           'type': 'none',
84           'variables': {
85             'java_in_dir': 'android/java',
86             'has_java_resources': 1,
87             'R_package': 'org.chromium.chromoting',
88             'R_package_relpath': 'org/chromium/chromoting',
89             'res_extra_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res' ],
90             'res_extra_files': [
91               '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)" resources/remoting_strings.grd)',
92               '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res/drawable/chromoting128.png',
93               '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res/drawable/icon_host.png',
94             ],
95           },
96           'dependencies': [
97             '../base/base.gyp:base_java',
98             '../ui/android/ui_android.gyp:ui_java',
99             'remoting_android_resources',
100           ],
101           'includes': [ '../build/java.gypi' ],
102         },
103         {
104           'target_name': 'remoting_apk',
105           'type': 'none',
106           'dependencies': [
107             'remoting_apk_manifest',
108             'remoting_client_jni',
109             'remoting_android_client_java',
110           ],
111           'variables': {
112             'apk_name': '<!(python <(version_py_path) -f <(branding_path) -t "@APK_FILE_NAME@")',
113             'android_app_version_name': '<(version_full)',
114             'android_app_version_code': '<!(python tools/android_version.py <(android_app_version_name))',
115             'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/AndroidManifest.xml',
116             'java_in_dir': 'android/apk',
117             'native_lib_target': 'libremoting_client_jni',
118           },
119           'includes': [ '../build/java_apk.gypi' ],
120         },  # end of target 'remoting_apk'
121         {
122           'target_name': 'remoting_test_apk',
123           'type': 'none',
124           'dependencies': [
125             '../base/base.gyp:base_java_test_support',
126             'remoting_android_client_java',
127           ],
128           'variables': {
129             'apk_name': 'ChromotingTest',
130             'java_in_dir': 'android/javatests',
131             'is_test_apk': 1,
132           },
133           'includes': [ '../build/java_apk.gypi' ],
134         },  # end of target 'remoting_test_apk'
135       ],  # end of 'targets'
136     }],  # 'OS=="android"'
138     ['OS=="android" and gtest_target_type=="shared_library"', {
139       'targets': [
140         {
141           'target_name': 'remoting_unittests_apk',
142           'type': 'none',
143           'dependencies': [
144             'remoting_unittests',
145           ],
146           'variables': {
147             'test_suite_name': 'remoting_unittests',
148           },
149           'includes': [ '../build/apk_test.gypi' ],
150         },
151       ],
152     }],  # 'OS=="android" and gtest_target_type=="shared_library"'
153   ],  # end of 'conditions'