Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: chrome/android/BUILD.gn

Issue 570203002: Make chrome_shell_apk build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-chrome-jamesr
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 import("//build/config/android/config.gni")
6 import("//build/config/android/rules.gni")
7 import("//third_party/icu/config.gni")
8
9
10 # GYP: //chrome/chrome.gyp:chrome_java (resources part)
11 android_resources("chrome_java_resources") {
12 resource_dirs = [
13 "java/res",
14 ]
15 deps = [
16 ":chrome_strings_grd",
17 "//content/public/android:content_java_resources",
18 "//chrome/app:java_strings_grd",
19 "//third_party/android_tools:android_support_v7_appcompat_resources",
20 ]
21 custom_package = "org.chromium.chrome"
22 }
23
24 # GYP: //chrome/chrome.gyp:chrome_strings_grd
25 java_strings_grd("chrome_strings_grd") {
26 grd_file = "java/strings/android_chrome_strings.grd"
27 outputs = [
28 "values-am/android_chrome_strings.xml",
29 "values-ar/android_chrome_strings.xml",
30 "values-bg/android_chrome_strings.xml",
31 "values-ca/android_chrome_strings.xml",
32 "values-cs/android_chrome_strings.xml",
33 "values-da/android_chrome_strings.xml",
34 "values-de/android_chrome_strings.xml",
35 "values-el/android_chrome_strings.xml",
36 "values/android_chrome_strings.xml",
37 "values-en-rGB/android_chrome_strings.xml",
38 "values-es/android_chrome_strings.xml",
39 "values-es-rUS/android_chrome_strings.xml",
40 "values-fa/android_chrome_strings.xml",
41 "values-fi/android_chrome_strings.xml",
42 "values-tl/android_chrome_strings.xml",
43 "values-fr/android_chrome_strings.xml",
44 "values-hi/android_chrome_strings.xml",
45 "values-hr/android_chrome_strings.xml",
46 "values-hu/android_chrome_strings.xml",
47 "values-in/android_chrome_strings.xml",
48 "values-it/android_chrome_strings.xml",
49 "values-iw/android_chrome_strings.xml",
50 "values-ja/android_chrome_strings.xml",
51 "values-ko/android_chrome_strings.xml",
52 "values-lt/android_chrome_strings.xml",
53 "values-lv/android_chrome_strings.xml",
54 "values-nl/android_chrome_strings.xml",
55 "values-nb/android_chrome_strings.xml",
56 "values-pl/android_chrome_strings.xml",
57 "values-pt-rBR/android_chrome_strings.xml",
58 "values-pt-rPT/android_chrome_strings.xml",
59 "values-ro/android_chrome_strings.xml",
60 "values-ru/android_chrome_strings.xml",
61 "values-sk/android_chrome_strings.xml",
62 "values-sl/android_chrome_strings.xml",
63 "values-sr/android_chrome_strings.xml",
64 "values-sv/android_chrome_strings.xml",
65 "values-sw/android_chrome_strings.xml",
66 "values-th/android_chrome_strings.xml",
67 "values-tr/android_chrome_strings.xml",
68 "values-uk/android_chrome_strings.xml",
69 "values-vi/android_chrome_strings.xml",
70 "values-zh-rCN/android_chrome_strings.xml",
71 "values-zh-rTW/android_chrome_strings.xml",
72 ]
73 }
74
75 # GYP: //chrome/chrome.gyp:chrome_java
76 android_library("chrome_java") {
77 deps = [
78 ":chrome_java_resources",
79 "//base:base_java",
80 "//net/android:net_java",
81 "//components/bookmarks/common/android:bookmarks_java",
82 "//components/dom_distiller/android:dom_distiller_core_java",
83 "//components/gcm_driver/android:gcm_driver_java",
84 "//components/invalidation:java",
85 "//components/navigation_interception/android:navigation_interception_java",
86 "//components/variations/android:variations_java",
87 "//components/web_contents_delegate_android:web_contents_delegate_android_ja va",
88 "//content/public/android:content_java",
89 "//printing:printing_java",
90 "//sync/android:sync_java",
91 "//third_party/android_tools:android_support_v13_java",
92 "//third_party/android_tools:android_support_v7_appcompat_java",
93 "//third_party/cacheinvalidation:cacheinvalidation_javalib",
94 "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
95 "//third_party/jsr-305:jsr_305_javalib",
96 "//ui/android:ui_java",
97 "//ui/android:ui_java_resources",
98 ]
99
100 srcjar_deps = [
101 ":activity_type_ids_javagen",
102 ":app_banner_metrics_ids_javagen",
103 ":profile_account_management_metrics_javagen",
104 ":profile_sync_service_model_type_selection_javagen",
105 ":resource_id_javagen",
106 ":toolbar_model_security_levels_javagen",
107 ":tab_load_status_javagen",
108 ]
109
110 DEPRECATED_java_in_dir = "java/src"
111 }
112
113 # GYP: //chrome/chrome_browser.gypi:activity_type_ids_java
114 java_cpp_template("activity_type_ids_javagen") {
115 sources = [
116 "java/ActivityTypeIds.template",
117 ]
118 package_name = "org/chromium/chrome/browser"
119 inputs = [
120 "../browser/android/activity_type_id_list.h"
121 ]
122 }
123
124 # GYP: //chrome/chrome_browser.gypi:app_banner_metrics_ids_java
125 java_cpp_template("app_banner_metrics_ids_javagen") {
126 sources = [
127 "java/AppBannerMetricsIds.template",
128 ]
129 package_name = "org/chromium/chrome/browser/banners"
130 inputs = [
131 "../browser/android/banners/app_banner_metrics_id_list.h"
132 ]
133 }
134
135 # GYP: //chrome/chrome_browser.gypi:resource_id_java
136 java_cpp_template("resource_id_javagen") {
137 sources = [
138 "java/ResourceId.template",
139 ]
140 package_name = "org/chromium/chrome/browser"
141 inputs = [
142 "../browser/android/resource_id.h"
143 ]
144 }
145
146 # GYP: //chrome/chrome_browser.gypi:profile_account_management_metrics_java
147 java_cpp_template("profile_account_management_metrics_javagen") {
148 sources = [
149 "java/ProfileAccountManagementMetrics.template",
150 ]
151 package_name = "org/chromium/chrome/browser/profiles"
152 inputs = [
153 "../browser/profiles/profile_metrics_list.h"
154 ]
155 }
156
157 # GYP: //chrome/chrome_browser.gypi:profile_sync_service_model_type_selection_ja va
158 java_cpp_template("profile_sync_service_model_type_selection_javagen") {
159 sources = [
160 "java/ModelTypeSelection.template",
161 ]
162 package_name = "org/chromium/chrome/browser/sync"
163 inputs = [
164 "../browser/sync/profile_sync_service_model_type_selection_android.h"
165 ]
166 }
167
168 # GYP: //chrome/chrome_browser.gypi:toolbar_model_security_levels_java
169 java_cpp_template("toolbar_model_security_levels_javagen") {
170 sources = [
171 "java/ToolbarModelSecurityLevel.template",
172 ]
173 package_name = "org/chromium/chrome/browser/ui/toolbar"
174 inputs = [
175 "../browser/ui/toolbar/toolbar_model_security_level_list.h"
176 ]
177 }
178
179 # GYP: //chrome/chrome_browser.gypi:tab_load_status_java
180 java_cpp_template("tab_load_status_javagen") {
181 sources = [
182 "java/TabLoadStatus.template",
183 ]
184 package_name = "org/chromium/chrome/browser"
185 inputs = [
186 "../browser/android/tab_load_status.h"
187 ]
188 }
189
190 # GYP: //chrome/chrome_shell.gypi:libchromeshell_base
191 static_library("chrome_shell_base") {
192 deps = [
193 "//chrome/browser/ui",
194 "//chrome:chrome_android_core",
195 "//base",
196 "//base/allocator",
197 "//content/public/app:browser",
198 "//skia",
199 ]
200
201 sources = [
202 "shell/chrome_shell_google_location_settings_helper.cc",
203 "shell/chrome_shell_google_location_settings_helper.h",
204 ]
205
206 # TODO(GYP):
207 #[ 'order_profiling!=0', {
208 #'conditions': [
209 #[ 'OS=="android"', {
210 #'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
211 #}],
212 #],
213 #}],
214 }
215
216 # TODO(GYP, cjhopman): make chrome_shell_base actually link and then move it to
217 # deps. Also, actually compile the main delegates at that point.
218 # GYP: //chrome/chrome_browser.gypi:libchromeshell
219 shared_library("chrome_shell") {
220 testonly = true
221 deps = [
222 #":chrome_shell_base",
223 ]
224 deps = [ ":chrome_java" ]
225 datadeps = [
226 ":chrome_shell_base"
227 ]
228 sources = [
229 # This file must always be included in the shared_library step to ensure
230 # JNI_OnLoad is exported.
231 #"//chrome/app/android/chrome_jni_onload.cc",
232 #"shell/chrome_main_delegate_chrome_shell_android.cc",
233 #"shell/chrome_main_delegate_chrome_shell_android.h",
234 ]
235 }
236
237 # GYP: //chrome/chrome_browser.gypi:libchromesyncshell
238 shared_library("chrome_sync_shell") {
239 testonly = true
240 deps = [
241 "//sync:test_support_sync_fake_server_android",
242 ]
243 datadeps = [
244 ":chrome_shell_base",
245 ]
246 sources = [
247 # This file must always be included in the shared_library step to ensure
248 # JNI_OnLoad is exported.
249 #"//chrome/app/android/chrome_jni_onload.cc",
250 #"sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc",
251 #"sync_shell/chrome_main_delegate_chrome_sync_shell_android.h",
252 ]
253 }
254
255 # GYP: N/A
256 android_resources("chrome_shell_resources") {
257 deps = [
258 ":chrome_java_resources",
259 ]
260 testonly = true
261 resource_dirs = [ "shell/res" ]
262 custom_package = "org.chromium.chrome.shell"
263 }
264
265 # GYP: N/A
266 android_library("chrome_shell_java") {
267 testonly = true
268 deps = [
269 ":chrome_shell_resources",
270 ":chrome_java",
271 "//base:base_java",
272 "//content/public/android:content_java",
273 "//components/dom_distiller/android:dom_distiller_core_java",
274 "//components/web_contents_delegate_android:web_contents_delegate_android_ja va",
275 "//printing:printing_java",
276 "//net/android:net_java",
277 "//sync/android:sync_java",
278 "//ui/android:ui_java",
279 ]
280 DEPRECATED_java_in_dir = "shell/java/src"
281 }
282
283 chrome_shell_assets_dir = "$root_build_dir/chrome_shell/assets"
284
285 # GYP: N/A
286 copy_ex("chrome_shell_assets") {
287 clear_dir = true
288 dest = chrome_shell_assets_dir
289 deps = [
290 "//chrome:packed_resources",
291 "//chrome:packed_extra_resources",
292 ]
293 sources = [
294 "$root_build_dir/resources.pak",
295 "$root_build_dir/chrome_100_percent.pak",
296 "$root_build_dir/locales/am.pak",
297 "$root_build_dir/locales/ar.pak",
298 "$root_build_dir/locales/bg.pak",
299 "$root_build_dir/locales/ca.pak",
300 "$root_build_dir/locales/cs.pak",
301 "$root_build_dir/locales/da.pak",
302 "$root_build_dir/locales/de.pak",
303 "$root_build_dir/locales/el.pak",
304 "$root_build_dir/locales/en-GB.pak",
305 "$root_build_dir/locales/en-US.pak",
306 "$root_build_dir/locales/es.pak",
307 "$root_build_dir/locales/es-419.pak",
308 "$root_build_dir/locales/fa.pak",
309 "$root_build_dir/locales/fi.pak",
310 "$root_build_dir/locales/fil.pak",
311 "$root_build_dir/locales/fr.pak",
312 "$root_build_dir/locales/he.pak",
313 "$root_build_dir/locales/hi.pak",
314 "$root_build_dir/locales/hr.pak",
315 "$root_build_dir/locales/hu.pak",
316 "$root_build_dir/locales/id.pak",
317 "$root_build_dir/locales/it.pak",
318 "$root_build_dir/locales/ja.pak",
319 "$root_build_dir/locales/ko.pak",
320 "$root_build_dir/locales/lt.pak",
321 "$root_build_dir/locales/lv.pak",
322 "$root_build_dir/locales/nb.pak",
323 "$root_build_dir/locales/nl.pak",
324 "$root_build_dir/locales/pl.pak",
325 "$root_build_dir/locales/pt-BR.pak",
326 "$root_build_dir/locales/pt-PT.pak",
327 "$root_build_dir/locales/ro.pak",
328 "$root_build_dir/locales/ru.pak",
329 "$root_build_dir/locales/sk.pak",
330 "$root_build_dir/locales/sl.pak",
331 "$root_build_dir/locales/sr.pak",
332 "$root_build_dir/locales/sv.pak",
333 "$root_build_dir/locales/sw.pak",
334 "$root_build_dir/locales/th.pak",
335 "$root_build_dir/locales/tr.pak",
336 "$root_build_dir/locales/uk.pak",
337 "$root_build_dir/locales/vi.pak",
338 "$root_build_dir/locales/zh-CN.pak",
339 "$root_build_dir/locales/zh-TW.pak",
340 ]
341
342 if (icu_use_data_file) {
343 sources += [
344 "$root_build_dir/icudtl.dat"
345 ]
346 }
347 }
348
349 #TODO(GYP):
350 #'variables': {
351 #'conditions': [
352 #['component != "shared_library" and target_arch != "arm64" and target_arch != " x64" and profiling_full_stack_frames != 1', {
353 ## Only enable the chromium linker on regular builds, since the
354 ## component build crashes on Android 4.4. See b/11379966
355 #'use_chromium_linker': '1',
356 #}],
357 #],
358 #},
359
360 # GYP: //chrome/chrome_browser.gypi:chrome_shell_apk
361 android_apk("chrome_shell_apk") {
362 testonly = true
363 deps = [
364 ":chrome_shell_resources",
365 ":chrome_shell_java",
366 ":chrome_shell_assets",
367 ":chrome_shell",
368 ]
369 apk_name = "ChromeShell"
370 android_manifest = "shell/java/AndroidManifest.xml"
371 native_libs = [
372 "$root_build_dir/lib.stripped/libchrome_shell.so"
373 ]
374 asset_location = chrome_shell_assets_dir
375 }
376
377 # GYP: //chrome/chrome_browser.gypi:chrome_sync_shell_apk
378 android_apk("chrome_sync_shell_apk") {
379 testonly = true
380 deps = [
381 ":chrome_shell_resources",
382 ":chrome_shell_java",
383 ":chrome_shell_assets",
384 ":chrome_sync_shell",
385 ]
386 apk_name = "ChromeSyncShell"
387 android_manifest = "sync_shell/java/AndroidManifest.xml"
388 native_libs = [
389 "$root_build_dir/lib.stripped/libchrome_sync_shell.so"
390 ]
391 asset_location = chrome_shell_assets_dir
392 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698