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/autofill/android:autofill_java_resources", | 78 "//components/autofill/android:autofill_java_resources", |
91 "//components/policy:app_restrictions_resources", | 79 "//components/policy:app_restrictions_resources", |
92 "//components/strings:components_locale_settings_grd", | 80 "//components/strings:components_locale_settings_grd", |
93 "//components/strings:components_strings_grd", | 81 "//components/strings:components_strings_grd", |
94 "//content/public/android:content_java_resources", | 82 "//content/public/android:content_java_resources", |
95 "//third_party/android_data_chart:android_data_chart_java_resources", | 83 "//third_party/android_data_chart:android_data_chart_java_resources", |
96 "//third_party/android_media:android_media_resources", | 84 "//third_party/android_media:android_media_resources", |
97 "//third_party/android_tools:android_support_design_java", | 85 "//third_party/android_tools:android_support_design_java", |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 # Overrides icon / name defined in chrome_java_resources. | 449 # Overrides icon / name defined in chrome_java_resources. |
462 android_resources("chrome_public_apk_resources") { | 450 android_resources("chrome_public_apk_resources") { |
463 resource_dirs = [ "java/res_chromium" ] | 451 resource_dirs = [ "java/res_chromium" ] |
464 | 452 |
465 # Dep needed to ensure override works properly. | 453 # Dep needed to ensure override works properly. |
466 deps = [ | 454 deps = [ |
467 ":chrome_java_resources", | 455 ":chrome_java_resources", |
468 ] | 456 ] |
469 } | 457 } |
470 | 458 |
471 # TODO(agrieve): Delete once downstream no longer references this target. | |
472 java_group("chrome_public_apk_assets") { | |
473 deps = [ | |
474 ":chrome_public_non_pak_assets", | |
475 ":chrome_public_pak_assets", | |
476 ] | |
477 } | |
478 | |
479 java_group("chrome_public_non_pak_assets") { | 459 java_group("chrome_public_non_pak_assets") { |
480 deps = [ | 460 deps = [ |
481 "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", | 461 "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", |
482 "//third_party/icu:icu_assets", | 462 "//third_party/icu:icu_assets", |
483 "//v8:v8_external_startup_data_assets", | 463 "//v8:v8_external_startup_data_assets", |
484 ] | 464 ] |
485 } | 465 } |
486 | 466 |
487 android_assets("chrome_public_pak_assets") { | 467 android_assets("chrome_public_pak_assets") { |
488 sources = [ | 468 sources = [ |
489 "$root_out_dir/chrome_100_percent.pak", | 469 "$root_out_dir/chrome_100_percent.pak", |
490 "$root_out_dir/resources.pak", | 470 "$root_out_dir/resources.pak", |
491 ] | 471 ] |
492 disable_compression = true | 472 disable_compression = true |
493 | 473 |
494 deps = [ | 474 deps = [ |
| 475 ":chrome_public_locale_pak_assets", |
495 "//chrome:packed_resources", | 476 "//chrome:packed_resources", |
496 "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", | 477 "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", |
497 "//third_party/icu:icu_assets", | 478 "//third_party/icu:icu_assets", |
498 "//v8:v8_external_startup_data_assets", | 479 "//v8:v8_external_startup_data_assets", |
499 ] | 480 ] |
500 } | 481 } |
501 | 482 |
| 483 # This target is separate from chrome_public_pak_assets because it does not |
| 484 # disable compression. |
| 485 android_assets("chrome_public_locale_pak_assets") { |
| 486 sources = [] |
| 487 foreach(_locale, locales - android_chrome_omitted_locales) { |
| 488 sources += [ "$root_out_dir/locales/$_locale.pak" ] |
| 489 } |
| 490 |
| 491 deps = [ |
| 492 "//chrome:packed_resources", |
| 493 ] |
| 494 } |
| 495 |
502 jinja_template_resources("chrome_public_apk_template_resources") { | 496 jinja_template_resources("chrome_public_apk_template_resources") { |
503 resources = [ | 497 resources = [ |
504 "java/res_template/xml/chromebackupscheme.xml", | 498 "java/res_template/xml/chromebackupscheme.xml", |
505 "java/res_template/xml/searchable.xml", | 499 "java/res_template/xml/searchable.xml", |
506 "java/res_template/xml/syncadapter.xml", | 500 "java/res_template/xml/syncadapter.xml", |
507 ] | 501 ] |
508 res_dir = "java/res_template" | 502 res_dir = "java/res_template" |
509 variables = chrome_public_jinja_variables | 503 variables = chrome_public_jinja_variables |
510 } | 504 } |
511 | 505 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 562 |
569 additional_locale_source_patterns = webview_repack_locales_source_patterns | 563 additional_locale_source_patterns = webview_repack_locales_source_patterns |
570 deps += webview_repack_locales_deps | 564 deps += webview_repack_locales_deps |
571 | 565 |
572 if (enable_resource_whitelist_generation) { | 566 if (enable_resource_whitelist_generation) { |
573 repack_whitelist = monochrome_resource_whitelist | 567 repack_whitelist = monochrome_resource_whitelist |
574 deps += [ ":monochrome_resource_whitelist" ] | 568 deps += [ ":monochrome_resource_whitelist" ] |
575 } | 569 } |
576 } | 570 } |
577 | 571 |
578 locale_pak_resources("monochrome_locale_paks") { | 572 android_assets("monochrome_pak_assets") { |
579 sources = [] | 573 sources = [ |
| 574 "$target_gen_dir/monochrome_paks/chrome_100_percent.pak", |
| 575 "$target_gen_dir/monochrome_paks/resources.pak", |
| 576 ] |
580 foreach(_locale, locales) { | 577 foreach(_locale, locales) { |
581 sources += [ "$target_gen_dir/monochrome_paks/locales/$_locale.pak" ] | 578 sources += [ "$target_gen_dir/monochrome_paks/locales/$_locale.pak" ] |
582 } | 579 } |
| 580 disable_compression = true |
583 | 581 |
584 deps = [ | 582 deps = [ |
585 ":monochrome_paks", | 583 ":monochrome_paks", |
586 ] | 584 ] |
587 } | 585 } |
588 } # current_toolchain == host_toolchain | 586 } # current_toolchain == host_toolchain |
589 | 587 |
590 android_assets("monochrome_pak_assets") { | |
591 sources = [ | |
592 "$target_gen_dir/monochrome_paks/chrome_100_percent.pak", | |
593 "$target_gen_dir/monochrome_paks/resources.pak", | |
594 ] | |
595 deps = [ | |
596 ":monochrome_paks", | |
597 ] | |
598 disable_compression = true | |
599 } | |
600 | |
601 # | 588 # |
602 # Only 32-bit //chrome/android/monochrome is needed, beside | 589 # Only 32-bit //chrome/android/monochrome is needed, beside |
603 # being built with 32-bit default toolchain, it is also built | 590 # being built with 32-bit default toolchain, it is also built |
604 # with secondary 32-bit toolchain in 64-bit platform because we | 591 # with secondary 32-bit toolchain in 64-bit platform because we |
605 # need 64-bit //android_webview/monochrome and 32-bit this target | 592 # need 64-bit //android_webview/monochrome and 32-bit this target |
606 # for 64-bit APK. | 593 # for 64-bit APK. |
607 if (!android_64bit_target_cpu || | 594 if (!android_64bit_target_cpu || |
608 current_toolchain == android_secondary_abi_toolchain) { | 595 current_toolchain == android_secondary_abi_toolchain) { |
609 shared_library("monochrome") { | 596 shared_library("monochrome") { |
610 sources = [ | 597 sources = [ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 "//components/sync:test_support_sync_fake_server_android", | 633 "//components/sync:test_support_sync_fake_server_android", |
647 ] | 634 ] |
648 } | 635 } |
649 | 636 |
650 # Contains rules common to chrome_public_apk and chrome_sync_shell_apk | 637 # Contains rules common to chrome_public_apk and chrome_sync_shell_apk |
651 template("chrome_public_apk_tmpl_shared") { | 638 template("chrome_public_apk_tmpl_shared") { |
652 chrome_public_apk_tmpl(target_name) { | 639 chrome_public_apk_tmpl(target_name) { |
653 forward_variables_from(invoker, "*") | 640 forward_variables_from(invoker, "*") |
654 | 641 |
655 native_lib_version_rule = "//build/util:chrome_version_json" | 642 native_lib_version_rule = "//build/util:chrome_version_json" |
656 | |
657 deps += [ | 643 deps += [ |
658 ":chrome_java", | 644 ":chrome_java", |
659 ":chrome_public_apk_assets", | |
660 ":chrome_public_apk_resources", | 645 ":chrome_public_apk_resources", |
| 646 ":chrome_public_non_pak_assets", |
| 647 ":chrome_public_pak_assets", |
661 "//base:base_java", | 648 "//base:base_java", |
662 ] | 649 ] |
663 } | 650 } |
664 } | 651 } |
665 | 652 |
666 chrome_public_apk_tmpl_shared("chrome_public_apk") { | 653 chrome_public_apk_tmpl_shared("chrome_public_apk") { |
667 android_manifest = chrome_public_android_manifest | 654 android_manifest = chrome_public_android_manifest |
668 android_manifest_dep = ":chrome_public_android_manifest" | 655 android_manifest_dep = ":chrome_public_android_manifest" |
669 apk_name = "ChromePublic" | 656 apk_name = "ChromePublic" |
670 shared_libraries = [ ":chrome" ] | 657 shared_libraries = [ ":chrome" ] |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 instrumentation_test_apk("chrome_sync_shell_test_apk") { | 741 instrumentation_test_apk("chrome_sync_shell_test_apk") { |
755 apk_name = "ChromeSyncShellTest" | 742 apk_name = "ChromeSyncShellTest" |
756 apk_under_test = ":chrome_sync_shell_apk" | 743 apk_under_test = ":chrome_sync_shell_apk" |
757 android_manifest = chrome_sync_shell_test_apk_manifest | 744 android_manifest = chrome_sync_shell_test_apk_manifest |
758 android_manifest_dep = ":chrome_sync_shell_test_apk_manifest" | 745 android_manifest_dep = ":chrome_sync_shell_test_apk_manifest" |
759 deps = [ | 746 deps = [ |
760 ":chrome_sync_shell_test_apk_java", | 747 ":chrome_sync_shell_test_apk_java", |
761 ] | 748 ] |
762 proguard_enabled = !is_java_debug | 749 proguard_enabled = !is_java_debug |
763 } | 750 } |
OLD | NEW |