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.
5 import("//build/config/android/config.gni")
6 import("//build/config/android/rules.gni")
7 import("//build/module_args/v8.gni")
8 import("//chrome/version.gni")
9 import("//testing/test.gni")
10 import("//third_party/icu/config.gni")
11 import("//third_party/protobuf/proto_library.gni")
14 manifest_package = "org.chromium.chrome"
15 if (enable_configuration_policy) {
16 configuration_policy = 1
18 configuration_policy = 0
22 "channel=$android_channel",
23 "manifest_package=$manifest_package",
24 "configuration_policy=$configuration_policy",
27 chrome_android_paks_gypi =
28 exec_script("//build/gypi_to_gn.py",
30 rebase_path("//chrome/chrome_android_paks.gypi"),
31 "--replace=<(PRODUCT_DIR)=$root_out_dir",
34 [ "//chrome/chrome_android_paks.gypi" ])
36 locale_pak_resources("chrome_locale_paks") {
37 sources = chrome_android_paks_gypi.chrome_android_pak_locale_resources
40 "//chrome:packed_resources",
44 # GYP: //chrome/chrome.gyp:chrome_java (resources part)
45 android_resources("chrome_java_resources") {
46 if (!defined(android_branding_res_dirs)) {
47 android_branding_res_dirs = [ "//chrome/android/java/res_chromium" ]
49 resource_dirs = [ "java/res" ] + android_branding_res_dirs
51 ":chrome_locale_paks",
52 ":chrome_strings_grd",
53 "//components/policy:app_restrictions_resources",
54 "//content/public/android:content_java_resources",
55 "//chrome/app:java_strings_grd",
56 "//third_party/android_data_chart:android_data_chart_java_resources",
57 "//third_party/android_media:android_media_resources",
59 if (!enable_configuration_policy) {
60 deps -= [ "//components/policy:app_restrictions_resources" ]
62 custom_package = "org.chromium.chrome"
65 # GYP: //chrome/chrome.gyp:chrome_strings_grd
66 java_strings_grd("chrome_strings_grd") {
67 grd_file = "java/strings/android_chrome_strings.grd"
69 "values-am/android_chrome_strings.xml",
70 "values-ar/android_chrome_strings.xml",
71 "values-bg/android_chrome_strings.xml",
72 "values-ca/android_chrome_strings.xml",
73 "values-cs/android_chrome_strings.xml",
74 "values-da/android_chrome_strings.xml",
75 "values-de/android_chrome_strings.xml",
76 "values-el/android_chrome_strings.xml",
77 "values/android_chrome_strings.xml",
78 "values-en-rGB/android_chrome_strings.xml",
79 "values-es/android_chrome_strings.xml",
80 "values-es-rUS/android_chrome_strings.xml",
81 "values-fa/android_chrome_strings.xml",
82 "values-fi/android_chrome_strings.xml",
83 "values-tl/android_chrome_strings.xml",
84 "values-fr/android_chrome_strings.xml",
85 "values-hi/android_chrome_strings.xml",
86 "values-hr/android_chrome_strings.xml",
87 "values-hu/android_chrome_strings.xml",
88 "values-in/android_chrome_strings.xml",
89 "values-it/android_chrome_strings.xml",
90 "values-iw/android_chrome_strings.xml",
91 "values-ja/android_chrome_strings.xml",
92 "values-ko/android_chrome_strings.xml",
93 "values-lt/android_chrome_strings.xml",
94 "values-lv/android_chrome_strings.xml",
95 "values-nl/android_chrome_strings.xml",
96 "values-nb/android_chrome_strings.xml",
97 "values-pl/android_chrome_strings.xml",
98 "values-pt-rBR/android_chrome_strings.xml",
99 "values-pt-rPT/android_chrome_strings.xml",
100 "values-ro/android_chrome_strings.xml",
101 "values-ru/android_chrome_strings.xml",
102 "values-sk/android_chrome_strings.xml",
103 "values-sl/android_chrome_strings.xml",
104 "values-sr/android_chrome_strings.xml",
105 "values-sv/android_chrome_strings.xml",
106 "values-sw/android_chrome_strings.xml",
107 "values-th/android_chrome_strings.xml",
108 "values-tr/android_chrome_strings.xml",
109 "values-uk/android_chrome_strings.xml",
110 "values-vi/android_chrome_strings.xml",
111 "values-zh-rCN/android_chrome_strings.xml",
112 "values-zh-rTW/android_chrome_strings.xml",
116 # GYP: //chrome/chrome.gyp:chrome_java
117 android_library("chrome_java") {
119 ":chrome_java_resources",
120 ":document_tab_model_info_proto_java",
122 "//net/android:net_java",
123 "//components/bookmarks/common/android:bookmarks_java",
124 "//components/dom_distiller/android:dom_distiller_content_java",
125 "//components/dom_distiller/android:dom_distiller_core_java",
126 "//components/gcm_driver/android:gcm_driver_java",
127 "//components/invalidation/impl:java",
128 "//components/navigation_interception/android:navigation_interception_java",
129 "//components/policy/android:policy_java",
130 "//components/precache/android:precache_java",
131 "//components/safe_json/android:safe_json_java",
132 "//components/service_tab_launcher:service_tab_launcher_java",
133 "//components/signin/core/browser/android:java",
134 "//components/variations/android:variations_java",
135 "//components/web_contents_delegate_android:web_contents_delegate_android_java",
136 "//content/public/android:content_java",
137 "//media/base/android:media_java",
138 "//printing:printing_java",
139 "//sync/android:sync_java",
140 "//third_party/android_data_chart:android_data_chart_java",
141 "//third_party/android_media:android_media_java",
142 "//third_party/android_protobuf:protobuf_nano_javalib",
143 "//third_party/android_swipe_refresh:android_swipe_refresh_java",
144 "//third_party/android_tools:android_gcm_java",
145 "//third_party/android_tools:android_support_design_java",
146 "//third_party/android_tools:android_support_v13_java",
147 "//third_party/android_tools:android_support_v7_appcompat_java",
148 "//third_party/android_tools:android_support_v7_mediarouter_java",
149 "//third_party/android_tools:android_support_v7_mediarouter_resources",
150 "//third_party/android_tools:android_support_v7_recyclerview_java",
151 "//third_party/cacheinvalidation:cacheinvalidation_javalib",
152 "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
153 "//third_party/jsr-305:jsr_305_javalib",
154 "//third_party/WebKit/public:blink_headers_java",
155 "//media/base/android:media_java",
156 "//media/midi:midi_java",
157 "//ui/android:ui_java",
158 "//ui/android:ui_java_resources",
159 google_play_services_library,
162 if (android_sdk_version != "M") {
163 deps += [ "//third_party/android_tools:preview_java_sources" ]
167 ":chrome_android_java_enums_srcjar",
168 ":chrome_version_srcjar",
169 ":custom_tabs_service_aidl",
170 ":resource_id_javagen",
171 "//chrome:page_info_connection_type_javagen",
172 "//chrome:content_setting_javagen",
173 "//chrome:content_settings_type_javagen",
174 "//components/enhanced_bookmarks:enhanced_bookmarks_java_enums_srcjar",
175 "//components/offline_pages:offline_pages_enums_java",
178 DEPRECATED_java_in_dir = "java/src"
181 # GYP: //chrome/chrome_browser.gypi:activity_type_ids_java
182 # GYP: //chrome/chrome_browser.gypi:connectivity_check_result_java
183 # GYP: //chrome/chrome_browser.gypi:shortcut_source_java
184 # GYP: //chrome/chrome_browser.gypi:profile_account_management_metrics_java
185 # GYP: //chrome/chrome_browser.gypi:connection_security_security_levels_java
186 # GYP: //chrome/chrome_browser.gypi:tab_load_status_java
187 java_cpp_enum("chrome_android_java_enums_srcjar") {
189 "//chrome/browser/android/activity_type_ids.h",
190 "//chrome/browser/android/feedback/connectivity_checker.cc",
191 "//chrome/browser/android/shortcut_info.h",
192 "//chrome/browser/android/tab_android.h",
193 "//chrome/browser/profiles/profile_metrics.h",
194 "//chrome/browser/ssl/connection_security.h",
197 "org/chromium/chrome/browser/ActivityTypeIds.java",
198 "org/chromium/chrome/browser/feedback/ConnectivityCheckResult.java",
199 "org/chromium/chrome/browser/ShortcutSource.java",
200 "org/chromium/chrome/browser/TabLoadStatus.java",
201 "org/chromium/chrome/browser/profiles/ProfileAccountManagementMetrics.java",
202 "org/chromium/chrome/browser/ssl/ConnectionSecurityLevel.java",
206 # GYP: //chrome/chrome_browser.gypi:document_tab_model_info_proto_java
207 proto_java_library("document_tab_model_info_proto_java") {
208 proto_path = "java/src/org/chromium/chrome/browser/tabmodel/document"
210 "$proto_path/document_tab_model_info.proto",
214 # GYP: //chrome/chrome_browser.gypi:resource_id_java
215 java_cpp_template("resource_id_javagen") {
217 "java/ResourceId.template",
219 package_name = "org/chromium/chrome/browser"
221 "../browser/android/resource_id.h",
225 # GYP: //chrome/chrome_shell.gypi:libchromeshell_base
226 group("chrome_shell_base") {
228 "//chrome/browser/ui",
229 "//chrome:chrome_android_core",
232 "//content/public/app:both",
236 #[ 'order_profiling!=0', {
237 #'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
241 # GYP: //chrome/chrome_shell.gypi:libchromeshell
242 shared_library("chrome_shell") {
245 "shell/chrome_main_delegate_chrome_shell_android.cc",
246 "shell/chrome_main_delegate_chrome_shell_android.h",
247 "shell/chrome_shell_entry_point.cc",
250 ":chrome_shell_base",
254 # GYP: //chrome/chrome_shell.gypi:libchromesyncshell
255 shared_library("chrome_sync_shell") {
258 #"shell/chrome_shell_entry_point.cc",
259 #"sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc",
260 #"sync_shell/chrome_main_delegate_chrome_sync_shell_android.h",
263 "//sync:test_support_sync_fake_server_android",
265 data_deps = [ ":chrome_shell_base" ]
269 android_resources("chrome_shell_resources") {
271 ":chrome_java_resources",
274 resource_dirs = [ "shell/res" ]
275 custom_package = "org.chromium.chrome.shell"
279 android_library("chrome_shell_java") {
283 ":chrome_java_resources",
284 ":chrome_shell_resources",
286 "//content/public/android:content_java",
287 "//components/dom_distiller/android:dom_distiller_content_java",
288 "//components/dom_distiller/android:dom_distiller_core_java",
289 "//components/service_tab_launcher:service_tab_launcher_java",
290 "//components/web_contents_delegate_android:web_contents_delegate_android_java",
291 "//printing:printing_java",
292 "//net/android:net_java",
293 "//sync/android:sync_java",
294 "//third_party/android_tools:android_support_v13_java",
295 "//third_party/android_tools:android_support_v7_appcompat_java",
296 "//ui/android:ui_java",
298 DEPRECATED_java_in_dir = "shell/java/src"
301 chrome_shell_assets_dir = "$root_build_dir/chrome_shell/assets"
304 copy_ex("chrome_shell_assets") {
306 dest = chrome_shell_assets_dir
308 "$root_build_dir/chrome_100_percent.pak",
309 "$root_build_dir/locales/am.pak",
310 "$root_build_dir/locales/ar.pak",
311 "$root_build_dir/locales/bg.pak",
312 "$root_build_dir/locales/ca.pak",
313 "$root_build_dir/locales/cs.pak",
314 "$root_build_dir/locales/da.pak",
315 "$root_build_dir/locales/de.pak",
316 "$root_build_dir/locales/el.pak",
317 "$root_build_dir/locales/en-GB.pak",
318 "$root_build_dir/locales/en-US.pak",
319 "$root_build_dir/locales/es-419.pak",
320 "$root_build_dir/locales/es.pak",
321 "$root_build_dir/locales/fa.pak",
322 "$root_build_dir/locales/fi.pak",
323 "$root_build_dir/locales/fil.pak",
324 "$root_build_dir/locales/fr.pak",
325 "$root_build_dir/locales/he.pak",
326 "$root_build_dir/locales/hi.pak",
327 "$root_build_dir/locales/hr.pak",
328 "$root_build_dir/locales/hu.pak",
329 "$root_build_dir/locales/id.pak",
330 "$root_build_dir/locales/it.pak",
331 "$root_build_dir/locales/ja.pak",
332 "$root_build_dir/locales/ko.pak",
333 "$root_build_dir/locales/lt.pak",
334 "$root_build_dir/locales/lv.pak",
335 "$root_build_dir/locales/nb.pak",
336 "$root_build_dir/locales/nl.pak",
337 "$root_build_dir/locales/pl.pak",
338 "$root_build_dir/locales/pt-BR.pak",
339 "$root_build_dir/locales/pt-PT.pak",
340 "$root_build_dir/locales/ro.pak",
341 "$root_build_dir/locales/ru.pak",
342 "$root_build_dir/locales/sk.pak",
343 "$root_build_dir/locales/sl.pak",
344 "$root_build_dir/locales/sr.pak",
345 "$root_build_dir/locales/sv.pak",
346 "$root_build_dir/locales/sw.pak",
347 "$root_build_dir/locales/th.pak",
348 "$root_build_dir/locales/tr.pak",
349 "$root_build_dir/locales/uk.pak",
350 "$root_build_dir/locales/vi.pak",
351 "$root_build_dir/locales/zh-CN.pak",
352 "$root_build_dir/locales/zh-TW.pak",
353 "$root_build_dir/resources.pak",
356 "//chrome:packed_resources",
357 "//chrome:packed_extra_resources",
360 if (icu_use_data_file) {
361 sources += [ "$root_build_dir/icudtl.dat" ]
362 deps += [ "//third_party/icu:icudata" ]
364 if (v8_use_external_startup_data) {
366 "$root_build_dir/natives_blob.bin",
367 "$root_build_dir/snapshot_blob.bin",
373 chrome_shell_manifest =
374 "$target_gen_dir/chrome_shell_manifest/AndroidManifest.xml"
376 # GYP: //chrome/chrome_shell.gypi:chrome_shell_manifest
377 jinja_template("chrome_shell_manifest") {
379 input = "shell/java/AndroidManifest.xml.jinja2"
380 output = chrome_shell_manifest
383 # GYP: //chrome/chrome_shell.gypi:chrome_shell_apk
384 android_apk("chrome_shell_apk") {
388 ":chrome_shell_assets",
389 ":chrome_shell_java",
390 ":chrome_shell_manifest",
391 ":chrome_shell_resources",
394 apk_name = "ChromeShell"
395 android_manifest = chrome_shell_manifest
396 native_libs = [ "libchrome_shell.so" ]
397 native_lib_version_rule = "//build/util:chrome_version_json"
399 rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
400 native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
401 asset_location = chrome_shell_assets_dir
406 #['component != "shared_library" and target_arch != "arm64" and target_arch != "x64" and profiling_full_stack_frames != 1', {
407 ## Only enable the chromium linker on regular builds, since the
408 ## component build crashes on Android 4.4. See b/11379966
409 #'use_chromium_linker': '1',
415 chrome_sync_shell_manifest =
416 "$target_gen_dir/chrome_sync_shell_manifest/AndroidManifest.xml"
418 # GYP: //chrome/chrome_shell.gypi:chrome_sync_shell_manifest
419 jinja_template("chrome_sync_shell_manifest") {
421 input = "sync_shell/java/AndroidManifest.xml.jinja2"
422 output = chrome_sync_shell_manifest
425 # GYP: //chrome/chrome_shell.gypi:chrome_sync_shell_apk
426 android_apk("chrome_sync_shell_apk") {
429 ":chrome_shell_resources",
430 ":chrome_shell_java",
431 ":chrome_shell_assets",
432 ":chrome_sync_shell",
433 ":chrome_sync_shell_manifest",
436 apk_name = "ChromeSyncShell"
437 android_manifest = chrome_sync_shell_manifest
438 native_libs = [ "libchrome_sync_shell.so" ]
439 asset_location = chrome_shell_assets_dir
442 # GYP: part of //chrome/chrome_tests.gypi:chrome_shell_test_apk
443 android_library("chrome_javatests") {
445 DEPRECATED_java_in_dir = "javatests_shell/src"
448 ":chrome_java_resources",
449 ":chrome_shell_java",
450 ":chrome_shell_resources",
451 ":chrome_shell_test_java",
453 "//base:base_java_test_support",
454 "//chrome/test/android:chrome_java_test_support",
455 "//components/bookmarks/common/android:bookmarks_java",
456 "//components/dom_distiller/android:dom_distiller_core_java",
457 "//components/invalidation/impl:java",
458 "//components/navigation_interception/android:navigation_interception_java",
459 "//content/public/android:content_java",
460 "//content/public/test/android:content_java_test_support",
461 "//net/android:net_java_test_support",
462 "//sync/android:sync_java",
463 "//sync:sync_java_test_support",
464 "//third_party/android_protobuf:protobuf_nano_javalib",
465 "//third_party/android_tools:android_support_v13_java",
466 "//third_party/android_tools:android_support_v7_appcompat_java",
467 "//third_party/cacheinvalidation:cacheinvalidation_javalib",
468 "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
469 "//third_party/jsr-305:jsr_305_javalib",
470 "//ui/android:ui_java",
474 android_library("chrome_shell_test_java") {
478 ":chrome_shell_java",
480 "//base:base_java_test_support",
481 "//chrome/test/android:chrome_java_test_support",
482 "//content/public/android:content_java",
483 "//content/public/test/android:content_java_test_support",
484 "//third_party/android_tools:android_support_v13_java",
485 "//third_party/android_tools:android_support_v7_appcompat_java",
486 "//ui/android:ui_java",
488 DEPRECATED_java_in_dir = "shell/javatests/src"
491 # GYP: //chrome/chrome_tests.gypi:chrome_shell_test_apk
492 instrumentation_test_apk("chrome_shell_test_apk") {
493 apk_under_test = ":chrome_shell_apk"
496 ":chrome_shell_test_java",
498 apk_name = "ChromeShellTest"
499 android_manifest = "shell/javatests/AndroidManifest.xml"
500 isolate_file = "../chrome_shell_test_apk.isolate"
503 # GYP: //chrome/chrome_tests.gypi:chrome_junit_tests
504 junit_binary("chrome_junit_tests") {
506 "junit/src/org/chromium/chrome/browser/childaccounts/ChildAccountServiceTest.java",
507 "junit/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtilsTest.java",
508 "junit/src/org/chromium/chrome/browser/omaha/ResponseParserTest.java",
509 "junit/src/org/chromium/chrome/browser/media/remote/AbstractMediaRouteControllerTest.java",
510 "junit/src/org/chromium/chrome/browser/media/remote/MediaUrlResolverTest.java",
511 "junit/src/org/chromium/chrome/browser/media/remote/RemoteVideoInfoTest.java",
512 "junit/src/org/chromium/chrome/browser/media/remote/TransportControlTest.java",
517 "//base:base_java_test_support",
518 "//sync:sync_java_test_support",
519 "//sync/android:sync_java",
520 "//third_party/junit:hamcrest",
521 "//third_party/android_tools:android_support_v7_mediarouter_java",
525 # GYP: //chrome/chrome_tests.gypi:chrome_sync_shell_test_apk
527 # TODO(GYP): We need sync/sync_tests.gypi:test_support_sync_proto_java to be ported.
529 instrumentation_test_apk("chrome_sync_shell_test_apk") {
530 apk_under_test = ":chrome_sync_shell_apk"
533 ":chrome_shell_java",
534 ":chrome_shell_test_java",
536 "//base:base_java_test_support",
537 "//chrome/test/android:chrome_java_test_support",
538 "//components/invalidation/impl:java",
539 "//content/public/android:content_java",
540 "//content/public/test/android:content_java_test_support",
541 "//sync/android:sync_java",
542 "//sync:sync_java_test_support",
543 "//third_party/android_tools:android_support_v13_java",
544 "//third_party/android_tools:android_support_v7_appcompat_java",
545 "//ui/android:ui_java",
547 apk_name = "ChromeSyncShellTest"
548 DEPRECATED_java_in_dir = "sync_shell/javatests/src"
549 android_manifest = "sync_shell/javatests/AndroidManifest.xml"
553 # GYP: //chrome/chrome_tests.gypi:chrome_shell_uiautomator_tests_java
554 android_library("uiautomator_tests_java") {
556 DEPRECATED_java_in_dir = "uiautomator_tests/src"
558 "//base:base_java_test_support",
559 "//third_party/android_tools:uiautomator_java",
563 # GYP: //chrome/chrome_tests.gypi:chrome_shell_uiautomator_tests
564 uiautomator_test("uiautomator_tests") {
567 ":uiautomator_tests_java",
571 # GYP: //chrome/chrome_android.gypi:chrome_version_java
572 chrome_version_java_dir = "$root_gen_dir/templates/chrome_version_java"
573 chrome_version_java_file = "$chrome_version_java_dir/org/chromium/chrome/browser/ChromeVersionConstants.java"
574 process_version("chrome_version_java") {
575 template_file = "java/ChromeVersionConstants.java.version"
576 output = chrome_version_java_file
579 "CHANNEL=str.upper('$android_channel')",
583 zip("chrome_version_srcjar") {
585 chrome_version_java_file,
587 output = "$target_gen_dir/$target_name.srcjar"
588 base_dir = chrome_version_java_dir
590 ":chrome_version_java",
594 #GYP: //chrome/android/chrome_apk.gyp:custom_tabs_service_aidl
595 android_aidl("custom_tabs_service_aidl") {
596 import_include = "java/src/android/support/customtabs"
597 interface_file = "java/src/android/support/customtabs/common.aidl"
599 "java/src/android/support/customtabs/ICustomTabsCallback.aidl",
600 "java/src/android/support/customtabs/ICustomTabsService.aidl",
604 # GYP: //chrome/android/chrome_apk.gyp:chrome_shared_test_java
605 android_library("chrome_shared_test_java") {
607 DEPRECATED_java_in_dir = "javatests/src"
611 "//base:base_java_test_support",
612 "//chrome/android:chrome_java",
613 "//chrome/android:chrome_java_resources",
614 "//chrome/test/android:chrome_java_test_support",
615 "//components/bookmarks/common/android:bookmarks_java",
616 "//components/dom_distiller/android:dom_distiller_core_java",
617 "//components/invalidation/impl:java",
618 "//components/invalidation/impl:javatests",
619 "//components/navigation_interception/android:navigation_interception_java",
620 "//components/policy/android:policy_java",
621 "//components/precache/android:precache_java",
622 "//components/precache/android:precache_javatests",
623 "//components/web_contents_delegate_android:web_contents_delegate_android_java",
624 "//content/public/android:content_java",
625 "//content/public/test/android:content_java_test_support",
626 "//net/android:net_java",
627 "//net/android:net_java_test_support",
628 "//printing:printing_java",
629 "//sync/android:sync_java",
630 "//sync/android:sync_javatests",
631 "//sync:sync_java_test_support",
632 "//third_party/android_tools:android_support_v7_appcompat_java",
633 "//third_party/android_tools:android_support_v7_recyclerview_java",
634 "//third_party/android_tools:android_support_v13_java",
635 "//third_party/cacheinvalidation:cacheinvalidation_javalib",
636 "//third_party/jsr-305:jsr_305_javalib",
637 "//ui/android:ui_java",
638 "//ui/android:ui_javatests",
642 chrome_public_apk_assets_dir = "$root_build_dir/chrome_public_apk_assets"
644 copy_ex("chrome_public_apk_assets") {
646 dest = chrome_public_apk_assets_dir
647 sources = chrome_android_paks_gypi.chrome_android_pak_input_resources
648 if (icu_use_data_file) {
649 sources += [ "$root_build_dir/icudtl.dat" ]
652 "//chrome:packed_extra_resources",
653 "//chrome:packed_resources",
654 "//third_party/icu:icudata",
657 if (v8_use_external_startup_data) {
659 "$root_build_dir/natives_blob.bin",
660 "$root_build_dir/snapshot_blob.bin",
665 sources += [ "$root_build_dir/resources.pak" ]
668 # GYP: //chrome/android/chrome_apk.gyp:chrome_apk_manifest
669 jinja_template("chrome_public_apk_manifest") {
670 input = "java/AndroidManifest.xml"
671 output = "$root_gen_dir/chrome_public_apk_manifest/AndroidManifest.xml"
672 variables = jinja_variables
674 "min_sdk_version=16",
675 "target_sdk_version=22",
679 # GYP: //chrome/android/chrome_apk.gyp:chrome_public_template_resources
680 jinja_template_resources("chrome_public_template_resources") {
682 "java/res_template/xml/searchable.xml",
683 "java/res_template/xml/syncadapter.xml",
685 res_dir = "java/res_template"
686 variables = jinja_variables
689 # GYP: //chrome/android/chrome_apk.gyp:libchrome_public
690 shared_library("chrome_public") {
692 "//chrome:chrome_android_core",
694 gypi_values = exec_script(
695 "//build/gypi_to_gn.py",
697 rebase_path("chrome_apk.gyp"),
698 "--replace=<(chrome_native_sources_dir)=../browser/android/",
701 [ "chrome_apk.gyp" ])
702 sources = gypi_values.chrome_public_app_native_sources
705 #'target_conditions': [
706 #['component != "shared_library"', {
707 #'product_extension': '<(version_libchrome_short).so',
712 android_apk("chrome_public_apk") {
713 version_name = "Developer Build"
715 android_manifest = get_target_outputs(":chrome_public_apk_manifest")
716 android_manifest = android_manifest[1]
717 apk_name = "ChromePublic"
718 native_libs = [ "$root_build_dir/lib.stripped/libchrome_public.so" ]
719 native_lib_version_rule = "//build/util:chrome_version_json"
721 rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
722 native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
723 asset_location = chrome_public_apk_assets_dir
727 ":chrome_java_resources",
729 ":chrome_public_apk_assets",
730 ":chrome_public_apk_manifest",
731 ":chrome_public_template_resources",
733 "//third_party/android_tools:google_play_services_default_resources",
737 chrome_public_test_apk_manifest =
738 "$root_gen_dir/chrome_public_test_apk_manifest/AndroidManifest.xml"
740 # GYP: //chrome/android/chrome_apk.gyp:chrome_public_test_apk_manifest
741 jinja_template("chrome_public_test_apk_manifest") {
742 input = "javatests/AndroidManifest.xml"
743 output = chrome_public_test_apk_manifest
744 variables = jinja_variables
747 # GYP: //chrome/android/chrome_apk.gyp:chrome_public_test_apk
748 instrumentation_test_apk("chrome_public_test_apk") {
749 # TODO(GYP,cjhopman): Does this need version code/name?
750 apk_name = "ChromePublicTest"
751 apk_under_test = ":chrome_public_apk"
752 android_manifest = chrome_public_test_apk_manifest
754 ":chrome_public_test_apk_manifest",
755 "//chrome/android:chrome_shared_test_java",
757 isolate_file = "../chrome_public_test_apk.isolate"