OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//android_webview/webview_repack_locales_list.gni") | 5 import("//android_webview/webview_repack_locales_list.gni") |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 import("//build/config/android/rules.gni") | 7 import("//build/config/android/rules.gni") |
8 import("//build/util/process_version.gni") | 8 import("//build/util/process_version.gni") |
9 import("//build_overrides/v8.gni") | 9 import("//build_overrides/v8.gni") |
10 import("//chrome/android/chrome_public_apk_tmpl.gni") | 10 import("//chrome/android/chrome_public_apk_tmpl.gni") |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 jinja_template("chrome_sync_shell_android_manifest") { | 60 jinja_template("chrome_sync_shell_android_manifest") { |
61 input = "java/AndroidManifest.xml" | 61 input = "java/AndroidManifest.xml" |
62 output = chrome_sync_shell_android_manifest | 62 output = chrome_sync_shell_android_manifest |
63 variables = chrome_sync_shell_jinja_variables | 63 variables = chrome_sync_shell_jinja_variables |
64 variables += [ | 64 variables += [ |
65 "min_sdk_version=16", | 65 "min_sdk_version=16", |
66 "target_sdk_version=22", | 66 "target_sdk_version=22", |
67 ] | 67 ] |
68 } | 68 } |
69 | 69 |
70 locale_pak_resources("chrome_locale_paks") { | |
71 sources = [] | |
72 foreach(_locale, locales - android_chrome_omitted_locales) { | |
73 sources += [ "$root_out_dir/locales/$_locale.pak" ] | |
74 } | |
75 | |
76 deps = [ | |
77 "//chrome:packed_resources", | |
78 ] | |
79 } | |
80 | |
81 android_resources("chrome_java_resources") { | 70 android_resources("chrome_java_resources") { |
82 resource_dirs = [ | 71 resource_dirs = [ |
83 "java/res", | 72 "java/res", |
84 "//chrome/android/java/res_chromium", | 73 "//chrome/android/java/res_chromium", |
85 ] | 74 ] |
86 deps = [ | 75 deps = [ |
87 ":chrome_locale_paks", | |
88 ":chrome_strings_grd", | 76 ":chrome_strings_grd", |
89 "//chrome/app:java_strings_grd", | 77 "//chrome/app:java_strings_grd", |
90 "//components/policy:app_restrictions_resources", | 78 "//components/policy:app_restrictions_resources", |
91 "//components/strings:components_locale_settings_grd", | 79 "//components/strings:components_locale_settings_grd", |
92 "//components/strings:components_strings_grd", | 80 "//components/strings:components_strings_grd", |
93 "//content/public/android:content_java_resources", | 81 "//content/public/android:content_java_resources", |
94 "//third_party/android_data_chart:android_data_chart_java_resources", | 82 "//third_party/android_data_chart:android_data_chart_java_resources", |
95 "//third_party/android_media:android_media_resources", | 83 "//third_party/android_media:android_media_resources", |
96 "//third_party/android_tools:android_support_design_java", | 84 "//third_party/android_tools:android_support_design_java", |
97 "//third_party/android_tools:android_support_v7_appcompat_java", | 85 "//third_party/android_tools:android_support_v7_appcompat_java", |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 # Overrides icon / name defined in chrome_java_resources. | 438 # Overrides icon / name defined in chrome_java_resources. |
451 android_resources("chrome_public_apk_resources") { | 439 android_resources("chrome_public_apk_resources") { |
452 resource_dirs = [ "java/res_chromium" ] | 440 resource_dirs = [ "java/res_chromium" ] |
453 | 441 |
454 # Dep needed to ensure override works properly. | 442 # Dep needed to ensure override works properly. |
455 deps = [ | 443 deps = [ |
456 ":chrome_java_resources", | 444 ":chrome_java_resources", |
457 ] | 445 ] |
458 } | 446 } |
459 | 447 |
460 # TODO(agrieve): Delete once downstream no longer references this target. | |
461 java_group("chrome_public_apk_assets") { | |
462 deps = [ | |
463 ":chrome_public_non_pak_assets", | |
464 ":chrome_public_pak_assets", | |
465 ] | |
466 } | |
467 | |
468 java_group("chrome_public_non_pak_assets") { | 448 java_group("chrome_public_non_pak_assets") { |
469 deps = [ | 449 deps = [ |
470 "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", | 450 "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", |
471 "//third_party/icu:icu_assets", | 451 "//third_party/icu:icu_assets", |
472 "//v8:v8_external_startup_data_assets", | 452 "//v8:v8_external_startup_data_assets", |
473 ] | 453 ] |
474 } | 454 } |
475 | 455 |
476 android_assets("chrome_public_pak_assets") { | 456 android_assets("chrome_public_pak_assets") { |
477 sources = [ | 457 sources = [ |
478 "$root_out_dir/chrome_100_percent.pak", | 458 "$root_out_dir/chrome_100_percent.pak", |
479 "$root_out_dir/resources.pak", | 459 "$root_out_dir/resources.pak", |
480 ] | 460 ] |
481 disable_compression = true | 461 disable_compression = true |
482 | 462 |
483 deps = [ | 463 deps = [ |
| 464 ":chrome_public_locale_pak_assets", |
484 "//chrome:packed_resources", | 465 "//chrome:packed_resources", |
485 "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", | 466 "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", |
486 "//third_party/icu:icu_assets", | 467 "//third_party/icu:icu_assets", |
487 "//v8:v8_external_startup_data_assets", | 468 "//v8:v8_external_startup_data_assets", |
488 ] | 469 ] |
489 } | 470 } |
490 | 471 |
| 472 # This target is separate from chrome_public_pak_assets because it does not |
| 473 # disable compression. |
| 474 android_assets("chrome_public_locale_pak_assets") { |
| 475 sources = [] |
| 476 foreach(_locale, locales - android_chrome_omitted_locales) { |
| 477 sources += [ "$root_out_dir/locales/$_locale.pak" ] |
| 478 } |
| 479 |
| 480 deps = [ |
| 481 "//chrome:packed_resources", |
| 482 ] |
| 483 } |
| 484 |
491 jinja_template_resources("chrome_public_apk_template_resources") { | 485 jinja_template_resources("chrome_public_apk_template_resources") { |
492 resources = [ | 486 resources = [ |
493 "java/res_template/xml/chromebackupscheme.xml", | 487 "java/res_template/xml/chromebackupscheme.xml", |
494 "java/res_template/xml/searchable.xml", | 488 "java/res_template/xml/searchable.xml", |
495 "java/res_template/xml/syncadapter.xml", | 489 "java/res_template/xml/syncadapter.xml", |
496 ] | 490 ] |
497 res_dir = "java/res_template" | 491 res_dir = "java/res_template" |
498 variables = chrome_public_jinja_variables | 492 variables = chrome_public_jinja_variables |
499 } | 493 } |
500 | 494 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 | 551 |
558 additional_locale_source_patterns = webview_repack_locales_source_patterns | 552 additional_locale_source_patterns = webview_repack_locales_source_patterns |
559 deps += webview_repack_locales_deps | 553 deps += webview_repack_locales_deps |
560 | 554 |
561 if (enable_resource_whitelist_generation) { | 555 if (enable_resource_whitelist_generation) { |
562 repack_whitelist = monochrome_resource_whitelist | 556 repack_whitelist = monochrome_resource_whitelist |
563 deps += [ ":monochrome_resource_whitelist" ] | 557 deps += [ ":monochrome_resource_whitelist" ] |
564 } | 558 } |
565 } | 559 } |
566 | 560 |
567 locale_pak_resources("monochrome_locale_paks") { | 561 android_assets("monochrome_pak_assets") { |
568 sources = [] | 562 sources = [ |
| 563 "$target_gen_dir/monochrome_paks/chrome_100_percent.pak", |
| 564 "$target_gen_dir/monochrome_paks/resources.pak", |
| 565 ] |
569 foreach(_locale, locales) { | 566 foreach(_locale, locales) { |
570 sources += [ "$target_gen_dir/monochrome_paks/locales/$_locale.pak" ] | 567 sources += [ "$target_gen_dir/monochrome_paks/locales/$_locale.pak" ] |
571 } | 568 } |
| 569 disable_compression = true |
572 | 570 |
573 deps = [ | 571 deps = [ |
574 ":monochrome_paks", | 572 ":monochrome_paks", |
575 ] | 573 ] |
576 } | 574 } |
577 } # current_toolchain == host_toolchain | 575 } # current_toolchain == host_toolchain |
578 | 576 |
579 android_assets("monochrome_pak_assets") { | |
580 sources = [ | |
581 "$target_gen_dir/monochrome_paks/chrome_100_percent.pak", | |
582 "$target_gen_dir/monochrome_paks/resources.pak", | |
583 ] | |
584 deps = [ | |
585 ":monochrome_paks", | |
586 ] | |
587 disable_compression = true | |
588 } | |
589 | |
590 # | 577 # |
591 # Only 32-bit //chrome/android/monochrome is needed, beside | 578 # Only 32-bit //chrome/android/monochrome is needed, beside |
592 # being built with 32-bit default toolchain, it is also built | 579 # being built with 32-bit default toolchain, it is also built |
593 # with secondary 32-bit toolchain in 64-bit platform because we | 580 # with secondary 32-bit toolchain in 64-bit platform because we |
594 # need 64-bit //android_webview/monochrome and 32-bit this target | 581 # need 64-bit //android_webview/monochrome and 32-bit this target |
595 # for 64-bit APK. | 582 # for 64-bit APK. |
596 if (!android_64bit_target_cpu || | 583 if (!android_64bit_target_cpu || |
597 current_toolchain == android_secondary_abi_toolchain) { | 584 current_toolchain == android_secondary_abi_toolchain) { |
598 shared_library("monochrome") { | 585 shared_library("monochrome") { |
599 sources = [ | 586 sources = [ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 "//components/sync:test_support_sync_fake_server_android", | 622 "//components/sync:test_support_sync_fake_server_android", |
636 ] | 623 ] |
637 } | 624 } |
638 | 625 |
639 # Contains rules common to chrome_public_apk and chrome_sync_shell_apk | 626 # Contains rules common to chrome_public_apk and chrome_sync_shell_apk |
640 template("chrome_public_apk_tmpl_shared") { | 627 template("chrome_public_apk_tmpl_shared") { |
641 chrome_public_apk_tmpl(target_name) { | 628 chrome_public_apk_tmpl(target_name) { |
642 forward_variables_from(invoker, "*") | 629 forward_variables_from(invoker, "*") |
643 | 630 |
644 native_lib_version_rule = "//build/util:chrome_version_json" | 631 native_lib_version_rule = "//build/util:chrome_version_json" |
645 | |
646 deps += [ | 632 deps += [ |
647 ":chrome_java", | 633 ":chrome_java", |
648 ":chrome_public_apk_assets", | |
649 ":chrome_public_apk_resources", | 634 ":chrome_public_apk_resources", |
| 635 ":chrome_public_non_pak_assets", |
| 636 ":chrome_public_pak_assets", |
650 "//base:base_java", | 637 "//base:base_java", |
651 ] | 638 ] |
652 } | 639 } |
653 } | 640 } |
654 | 641 |
655 chrome_public_apk_tmpl_shared("chrome_public_apk") { | 642 chrome_public_apk_tmpl_shared("chrome_public_apk") { |
656 android_manifest = chrome_public_android_manifest | 643 android_manifest = chrome_public_android_manifest |
657 android_manifest_dep = ":chrome_public_android_manifest" | 644 android_manifest_dep = ":chrome_public_android_manifest" |
658 apk_name = "ChromePublic" | 645 apk_name = "ChromePublic" |
659 shared_libraries = [ ":chrome" ] | 646 shared_libraries = [ ":chrome" ] |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 instrumentation_test_apk("chrome_sync_shell_test_apk") { | 730 instrumentation_test_apk("chrome_sync_shell_test_apk") { |
744 apk_name = "ChromeSyncShellTest" | 731 apk_name = "ChromeSyncShellTest" |
745 apk_under_test = ":chrome_sync_shell_apk" | 732 apk_under_test = ":chrome_sync_shell_apk" |
746 android_manifest = chrome_sync_shell_test_apk_manifest | 733 android_manifest = chrome_sync_shell_test_apk_manifest |
747 android_manifest_dep = ":chrome_sync_shell_test_apk_manifest" | 734 android_manifest_dep = ":chrome_sync_shell_test_apk_manifest" |
748 deps = [ | 735 deps = [ |
749 ":chrome_sync_shell_test_apk_java", | 736 ":chrome_sync_shell_test_apk_java", |
750 ] | 737 ] |
751 proguard_enabled = !is_java_debug | 738 proguard_enabled = !is_java_debug |
752 } | 739 } |
OLD | NEW |