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("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/android/rules.gni") | 6 import("//build/config/android/rules.gni") |
7 import("//build/module_args/v8.gni") | 7 import("//build/module_args/v8.gni") |
8 import("//chrome/version.gni") | 8 import("//chrome/version.gni") |
9 import("//testing/test.gni") | 9 import("//testing/test.gni") |
10 import("//third_party/icu/config.gni") | 10 import("//third_party/icu/config.gni") |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 ] | 767 ] |
768 } | 768 } |
769 | 769 |
770 libs = [ | 770 libs = [ |
771 "android", | 771 "android", |
772 "jnigraphics", | 772 "jnigraphics", |
773 ] | 773 ] |
774 | 774 |
775 defines = [] | 775 defines = [] |
776 } | 776 } |
| 777 |
| 778 chrome_public_apk_assets_dir = "$root_build_dir/chrome_public_apk_assets" |
| 779 |
| 780 chrome_android_paks_gypi = |
| 781 exec_script("//build/gypi_to_gn.py", |
| 782 [ rebase_path("//chrome/chrome_android_paks.gypi") ], |
| 783 "scope", |
| 784 [ "//chrome/chrome_android_paks.gypi" ]) |
| 785 |
| 786 copy_ex("chrome_public_apk_assets") { |
| 787 clear_dir = true |
| 788 dest = chrome_public_apk_assets_dir |
| 789 gypi_sources = chrome_android_paks_gypi.chrome_android_pak_input_resources |
| 790 cleaned_sources = rebase_path(gypi_sources, "<(PRODUCT_DIR)") |
| 791 sources = rebase_path(cleaned_sources, ".", root_out_dir) |
| 792 if (icu_use_data_file) { |
| 793 sources += [ "$root_build_dir/icudtl.dat" ] |
| 794 } |
| 795 |
| 796 if (v8_use_external_startup_data) { |
| 797 sources += [ |
| 798 "$root_build_dir/natives_blob.bin", |
| 799 "$root_build_dir/snapshot_blob.bin", |
| 800 ] |
| 801 } |
| 802 |
| 803 sources += [ "$root_build_dir/resources.pak" ] |
| 804 } |
| 805 |
| 806 # GYP: //chrome/android/chrome_apk.gyp:chrome_apk_manifest |
| 807 jinja_template("chrome_public_apk_manifest") { |
| 808 input = "java_staging/AndroidManifest.xml" |
| 809 output = "$root_gen_dir/chrome_public_apk_manifest/AndroidManifest.xml" |
| 810 variables = jinja_variables + [ "min_sdk_version=16" ] |
| 811 } |
| 812 |
| 813 # GYP: //chrome/android/chrome_apk.gyp:libchrome_public |
| 814 shared_library("chrome_public") { |
| 815 deps = [ |
| 816 "//chrome/android:chrome_staging", |
| 817 "//chrome:chrome_android_core", |
| 818 ] |
| 819 gypi_values = exec_script( |
| 820 "//build/gypi_to_gn.py", |
| 821 [ |
| 822 rebase_path("chrome_apk.gyp"), |
| 823 "--replace=<(chrome_native_sources_dir)=../browser/android/", |
| 824 ], |
| 825 "scope", |
| 826 [ "chrome_apk.gyp" ]) |
| 827 sources = gypi_values.chrome_public_app_native_sources |
| 828 |
| 829 # TODO(GYP): |
| 830 #'target_conditions': [ |
| 831 #['component != "shared_library"', { |
| 832 #'product_extension': '<(version_libchrome_short).so', |
| 833 #}], |
| 834 #], |
| 835 } |
| 836 |
| 837 android_apk("chrome_public_apk") { |
| 838 version_name = "Developer Build" |
| 839 version_code = "1" |
| 840 android_manifest = get_target_outputs(":chrome_public_apk_manifest") |
| 841 android_manifest = android_manifest[1] |
| 842 apk_name = "ChromePublic" |
| 843 native_libs = [ "$root_build_dir/lib.stripped/libchrome_public.so" ] |
| 844 native_lib_version_name = _version_full |
| 845 asset_location = chrome_public_apk_assets_dir |
| 846 |
| 847 deps = [ |
| 848 "//base:base_java", |
| 849 ":chrome_staging_java", |
| 850 ":chrome_staging_java_resources", |
| 851 ":chrome_public_apk_assets", |
| 852 ":chrome_public", |
| 853 "//third_party/android_tools:google_play_services_default_resources", |
| 854 ] |
| 855 } |
| 856 |
| 857 chrome_public_test_apk_manifest = |
| 858 "$root_gen_dir/chrome_public_test_apk_manifest/AndroidManifest.xml" |
| 859 |
| 860 # GYP: //chrome/android/chrome_apk.gyp:chrome_public_test_apk_manifest |
| 861 jinja_template("chrome_public_test_apk_manifest") { |
| 862 input = "javatests/AndroidManifest.xml" |
| 863 output = chrome_public_test_apk_manifest |
| 864 variables = jinja_variables |
| 865 } |
| 866 |
| 867 # GYP: //chrome/android/chrome_apk.gyp:chrome_public_test_apk |
| 868 android_apk("chrome_public_test_apk") { |
| 869 testonly = true |
| 870 |
| 871 # TODO(GYP,cjhopman): Does this need version code/name? |
| 872 apk_name = "ChromePublicTest" |
| 873 apk_under_test = ":chrome_public_apk" |
| 874 android_manifest = chrome_public_test_apk_manifest |
| 875 deps = [ |
| 876 "//chrome/test/android:chrome_staging_test_support_java", |
| 877 "//chrome/android:chrome_staging_test_java", |
| 878 ] |
| 879 } |
OLD | NEW |