Remove RULE_INPUT_PATH from inputs.
[chromium-blink-merge.git] / remoting / remoting_android.gypi
blob86b9e563eb3940a7df046d048dab075a64fc7dfb
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_apk',
83           'type': 'none',
84           'dependencies': [
85             'remoting_android_resources',
86             'remoting_apk_manifest',
87             'remoting_client_jni',
88           ],
89           'variables': {
90             'apk_name': '<!(python <(version_py_path) -f <(branding_path) -t "@APK_FILE_NAME@")',
91             'android_app_version_name': '<(version_full)',
92             'android_app_version_code': '<!(python tools/android_version.py <(android_app_version_name))',
93             'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/remoting/android/AndroidManifest.xml',
94             'native_lib_target': 'libremoting_client_jni',
95             'java_in_dir': 'android/java',
96             'R_package': 'org.chromium.chromoting',
97             'package_name': '<(_target_name)',
98             'resource_dir': 'resources/android',
99             'additional_res_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/remoting/android/res' ],
100             'additional_input_paths': [
101               '<(PRODUCT_DIR)/obj/remoting/remoting_android_resources.actions_rules_copies.stamp',
102               '<(PRODUCT_DIR)/obj/remoting/remoting_resources.actions_rules_copies.stamp',
103             ],
104           },
105           'includes': [ '../build/java_apk.gypi' ],
106         },  # end of target 'remoting_apk'
107         {
108           # remoting_apk creates a .jar file as a side effect. Any Java targets
109           # that need that .jar in their classpath should depend on this target.
110           'target_name': 'remoting_apk_java',
111           'type': 'none',
112           'dependencies': [
113             'remoting_apk',
114           ],
115           'includes': [ '../build/apk_fake_jar.gypi' ],
116         },  # end of target 'remoting_apk_java'
117         {
118           'target_name': 'remoting_test_apk',
119           'type': 'none',
120           'dependencies': [
121             '../base/base.gyp:base_java_test_support',
122             'remoting_apk_java',
123           ],
124           'variables': {
125             'apk_name': 'ChromotingTest',
126             'java_in_dir': 'android/javatests',
127             'is_test_apk': 1,
128           },
129           'includes': [ '../build/java_apk.gypi' ],
130         },  # end of target 'remoting_test_apk'
131       ],  # end of 'targets'
132     }],  # 'OS=="android"'
134     ['OS=="android" and gtest_target_type=="shared_library"', {
135       'targets': [
136         {
137           'target_name': 'remoting_unittests_apk',
138           'type': 'none',
139           'dependencies': [
140             'remoting_unittests',
141           ],
142           'variables': {
143             'test_suite_name': 'remoting_unittests',
144             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)remoting_unittests<(SHARED_LIB_SUFFIX)',
145           },
146           'includes': [ '../build/apk_test.gypi' ],
147         },
148       ],
149     }],  # 'OS=="android" and gtest_target_type=="shared_library"'
150   ],  # end of 'conditions'