OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 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. | |
4 { | |
5 'variables': { | |
6 'chromium_code': 1, | |
7 }, | |
8 'targets': [ | |
9 { | |
10 'target_name': 'libwebview', | |
11 'type': 'shared_library', | |
12 'dependencies': [ | |
13 '<(DEPTH)/chrome/chrome.gyp:browser', | |
14 '<(DEPTH)/chrome/chrome.gyp:renderer', | |
15 '<(DEPTH)/content/content.gyp:content', | |
16 '<(DEPTH)/android_webview/native/webview_native.gyp:webview_native', | |
17 '<(DEPTH)/chrome/browser/component/components.gyp:web_contents_delegate_
android', | |
18 '<(DEPTH)/chrome/browser/component/components.gyp:browser_component_jni_
headers', | |
19 ], | |
20 'include_dirs': [ | |
21 '../..', | |
22 '../../skia/config', | |
23 ], | |
24 'sources': [ | |
25 'aw_browser_dependency_factory_impl.cc', | |
26 'aw_browser_dependency_factory_impl.h', | |
27 'aw_content_browser_client.cc', | |
28 'aw_content_browser_client.h', | |
29 'main/webview_entry_point.cc', | |
30 'main/webview_main_delegate.cc', | |
31 'main/webview_main_delegate.h', | |
32 'main/webview_stubs.cc', | |
33 ], | |
34 'includes': [ | |
35 '../aw_browser.gypi', | |
36 ], | |
37 }, | |
38 { | |
39 'target_name': 'android_webview', | |
40 'type' : 'none', | |
41 'dependencies': [ | |
42 'libwebview', | |
43 ], | |
44 'variables': { | |
45 'install_binary_script': '../build/install_binary', | |
46 }, | |
47 'actions': [ | |
48 { | |
49 'action_name': 'libwebview_strip_and_install_in_android', | |
50 'inputs': [ | |
51 '<(SHARED_LIB_DIR)/libwebview.so', | |
52 ], | |
53 'outputs': [ | |
54 '<(android_product_out)/obj/lib/libwebview.so', | |
55 '<(android_product_out)/system/lib/libwebview.so', | |
56 '<(android_product_out)/symbols/system/lib/libwebview.so', | |
57 ], | |
58 'action': [ | |
59 '<(install_binary_script)', | |
60 '<@(_inputs)', | |
61 '<@(_outputs)', | |
62 ], | |
63 }, | |
64 ], | |
65 }, | |
66 { | |
67 'target_name': 'android_webview_java', | |
68 'type': 'none', | |
69 'dependencies': [ | |
70 '<(DEPTH)/content/content.gyp:content_java', | |
71 '<(DEPTH)/chrome/browser/component/components.gyp:web_contents_delegate_
android_java', | |
72 ], | |
73 'variables': { | |
74 'package_name': 'android_webview_java', | |
75 'java_in_dir': '<(DEPTH)/android_webview/java', | |
76 }, | |
77 'includes': [ '../../build/java.gypi' ], | |
78 }, | |
79 { | |
80 'target_name': 'android_webview_javatests', | |
81 'type': 'none', | |
82 'dependencies': [ | |
83 'android_webview_java', | |
84 '<(DEPTH)/base/base.gyp:base_java_test_support', | |
85 '<(DEPTH)/content/content.gyp:content_java', | |
86 '<(DEPTH)/content/content.gyp:content_javatests', | |
87 '<(DEPTH)/chrome/browser/component/components.gyp:web_contents_delegate_
android_java', | |
88 ], | |
89 'variables': { | |
90 'package_name': 'android_webview_javatests', | |
91 'java_in_dir': '<(DEPTH)/android_webview/javatests', | |
92 }, | |
93 'includes': [ '../../build/java.gypi' ], | |
94 }, | |
95 | |
96 { | |
97 'target_name': 'android_webview_apk', | |
98 'type': 'none', | |
99 'actions': [ | |
100 { | |
101 'action_name': 'copy_base_jar', | |
102 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar'], | |
103 'outputs': ['<(PRODUCT_DIR)/android_webview/java/libs/chromium_base.jar'
], | |
104 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
105 }, | |
106 { | |
107 'action_name': 'copy_net_jar', | |
108 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_net.jar'], | |
109 'outputs': ['<(PRODUCT_DIR)/android_webview/java/libs/chromium_net.jar']
, | |
110 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
111 }, | |
112 { | |
113 'action_name': 'copy_media_jar', | |
114 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_media.jar'], | |
115 'outputs': ['<(PRODUCT_DIR)/android_webview/java/libs/chromium_media.jar
'], | |
116 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
117 }, | |
118 { | |
119 'action_name': 'copy_content_jar', | |
120 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_content.jar'], | |
121 'outputs': ['<(PRODUCT_DIR)/android_webview/java/libs/chromium_content.j
ar'], | |
122 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
123 }, | |
124 { | |
125 'action_name': 'copy_web_contents_delegate_android_java', | |
126 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_web_contents_delegate_andro
id.jar'], | |
127 'outputs': ['<(PRODUCT_DIR)/android_webview/java/libs/chromium_web_conte
nts_delegate_android.jar'], | |
128 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
129 }, | |
130 { | |
131 'action_name': 'copy_android_webview_jar', | |
132 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_android_webview_java.jar'], | |
133 'outputs': ['<(PRODUCT_DIR)/android_webview/java/libs/chromium_android_w
ebview_java.jar'], | |
134 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
135 }, | |
136 { | |
137 'action_name': 'copy_android_webview_test_jar', | |
138 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_android_webview_javatests.j
ar'], | |
139 'outputs': ['<(PRODUCT_DIR)/android_webview/java/libs/chromium_android_w
ebview_javatests.jar'], | |
140 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
141 }, | |
142 { | |
143 'action_name': 'copy_chrome_pak', | |
144 'inputs': ['<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak'], | |
145 'outputs': ['<(PRODUCT_DIR)/android_webview/assets/chrome.pak'], | |
146 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
147 }, | |
148 { | |
149 'action_name': 'copy_chrome_100_percent_pak', | |
150 'inputs': ['<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak'], | |
151 'outputs': ['<(PRODUCT_DIR)/android_webview/assets/chrome_100_percent.pa
k'], | |
152 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
153 }, | |
154 { | |
155 'action_name': 'copy_resources_pak', | |
156 'inputs': ['<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'], | |
157 'outputs': ['<(PRODUCT_DIR)/android_webview/assets/resources.pak'], | |
158 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
159 }, | |
160 { | |
161 'action_name': 'copy_en_pak', | |
162 'inputs': ['<(SHARED_INTERMEDIATE_DIR)/repack/en-US.pak'], | |
163 'outputs': ['<(PRODUCT_DIR)/android_webview/assets/en.pak'], | |
164 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
165 }, | |
166 { | |
167 'action_name': 'copy_and_strip_so', | |
168 'inputs': ['<(SHARED_LIB_DIR)/libwebview.so'], | |
169 'outputs': ['<(PRODUCT_DIR)/android_webview/libs/<(android_app_abi)/libw
ebview.so'], | |
170 'action': [ | |
171 '<!(/bin/echo -n $STRIP)', | |
172 '--strip-unneeded', # All symbols not needed for relocation. | |
173 '<@(_inputs)', | |
174 '-o', | |
175 '<@(_outputs)', | |
176 ], | |
177 }, | |
178 { | |
179 'action_name': 'android_webview_apk', | |
180 'inputs': [ | |
181 '<(DEPTH)/android_webview/java/android_webview_apk.xml', | |
182 '<(DEPTH)/android_webview/java/AndroidManifest.xml', | |
183 '<(PRODUCT_DIR)/android_webview/java/libs/chromium_android_webview_jav
a.jar', | |
184 '<(PRODUCT_DIR)/android_webview/java/libs/chromium_android_webview_jav
atests.jar', | |
185 '<(PRODUCT_DIR)/android_webview/java/libs/chromium_base.jar', | |
186 '<(PRODUCT_DIR)/android_webview/java/libs/chromium_net.jar', | |
187 '<(PRODUCT_DIR)/android_webview/java/libs/chromium_media.jar', | |
188 '<(PRODUCT_DIR)/android_webview/java/libs/chromium_content.jar', | |
189 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', | |
190 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', | |
191 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', | |
192 '<(SHARED_INTERMEDIATE_DIR)/repack/en-US.pak', | |
193 '<(PRODUCT_DIR)/android_webview/libs/<(android_app_abi)/libwebview.so'
, | |
194 ], | |
195 'outputs': [ | |
196 '<(PRODUCT_DIR)/android_webview/AndroidWebView-debug.apk', | |
197 ], | |
198 'action': [ | |
199 'ant', | |
200 '-DPRODUCT_DIR=<(ant_build_out)', | |
201 '-DAPP_ABI=<(android_app_abi)', | |
202 '-DANDROID_SDK=<(android_sdk)', | |
203 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | |
204 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', | |
205 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | |
206 '-DANDROID_TOOLCHAIN=<(android_toolchain)', | |
207 '-buildfile', | |
208 '<(DEPTH)/android_webview/java/android_webview_apk.xml', | |
209 ], | |
210 'dependencies': [ | |
211 'libwebview', | |
212 'android_webview_java', | |
213 'android_webview_javatests', | |
214 '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources', | |
215 '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources', | |
216 ], | |
217 } | |
218 ], | |
219 }, | |
220 { | |
221 'target_name': 'android_webview_test_apk', | |
222 'type': 'none', | |
223 'dependencies': [ | |
224 'android_webview_apk', | |
225 '<(DEPTH)/content/content.gyp:content_javatests', | |
226 ], | |
227 'actions': [ | |
228 { | |
229 'action_name': 'copy_base_jar', | |
230 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar'], | |
231 'outputs': ['<(PRODUCT_DIR)/android_webview_test/java/libs/chromium_ba
se.jar'], | |
232 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
233 }, | |
234 { | |
235 'action_name': 'copy_base_javatests_jar', | |
236 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_base_javatests.jar'], | |
237 'outputs': ['<(PRODUCT_DIR)/android_webview_test/java/libs/chromium_ba
se_javatests.jar'], | |
238 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
239 }, | |
240 { | |
241 'action_name': 'copy_net_jar', | |
242 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_net.jar'], | |
243 'outputs': ['<(PRODUCT_DIR)/android_webview_test/java/libs/chromium_ne
t.jar'], | |
244 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
245 }, | |
246 { | |
247 'action_name': 'copy_media_jar', | |
248 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_media.jar'], | |
249 'outputs': ['<(PRODUCT_DIR)/android_webview_test/java/libs/chromium_me
dia.jar'], | |
250 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
251 }, | |
252 { | |
253 'action_name': 'copy_content_jar', | |
254 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_content.jar'], | |
255 'outputs': ['<(PRODUCT_DIR)/android_webview_test/java/libs/chromium_co
ntent.jar'], | |
256 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
257 }, | |
258 { | |
259 'action_name': 'copy_web_contents_delegate_android_java', | |
260 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_web_contents_delegate_and
roid.jar'], | |
261 'outputs': ['<(PRODUCT_DIR)/android_webview_test/java/libs/chromium_we
b_contents_delegate_android.jar'], | |
262 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
263 }, | |
264 { | |
265 'action_name': 'copy_content_javatests_jar', | |
266 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_content_javatests.jar'], | |
267 'outputs': ['<(PRODUCT_DIR)/android_webview_test/java/libs/chromium_co
ntent_javatests.jar'], | |
268 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
269 }, | |
270 { | |
271 'action_name': 'copy_android_webview_jar', | |
272 'inputs': ['<(PRODUCT_DIR)/lib.java/chromium_android_webview_java.jar'
], | |
273 'outputs': ['<(PRODUCT_DIR)/android_webview_test/java/libs/chromium_an
droid_webview_java.jar'], | |
274 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | |
275 }, | |
276 { | |
277 'action_name': 'android_webview_test_generate_apk', | |
278 'inputs': [ | |
279 '<(DEPTH)/android_webview/javatests/android_webview_test_apk.xml', | |
280 '<(DEPTH)/android_webview/javatests/AndroidManifest.xml', | |
281 '<!@(find <(DEPTH)/android_webview/javatests/ -name "*.java")' | |
282 ], | |
283 'outputs': [ | |
284 '<(PRODUCT_DIR)/android_webview_test/ContentShellTest-debug.apk', | |
285 ], | |
286 'action': [ | |
287 'ant', | |
288 '-DPRODUCT_DIR=<(ant_build_out)', | |
289 '-DAPP_ABI=<(android_app_abi)', | |
290 '-DANDROID_SDK=<(android_sdk)', | |
291 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | |
292 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', | |
293 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | |
294 '-DANDROID_TOOLCHAIN=<(android_toolchain)', | |
295 '-buildfile', | |
296 '<(DEPTH)/android_webview/javatests/android_webview_test_apk.xml', | |
297 ] | |
298 } | |
299 ], | |
300 }, | |
301 ], | |
302 } | |
OLD | NEW |