OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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/config/locales.gni") |
7 import("//build_overrides/v8.gni") | 8 import("//build_overrides/v8.gni") |
| 9 import("//third_party/icu/config.gni") |
8 import("//tools/grit/repack.gni") | 10 import("//tools/grit/repack.gni") |
| 11 import("webview_repack_locales.gni") |
| 12 |
| 13 if (current_cpu == "arm" || current_cpu == "x86" || current_cpu == "mipsel") { |
| 14 arch_suffix = 32 |
| 15 } else { |
| 16 arch_suffix = 64 |
| 17 } |
9 | 18 |
10 # This is dummy target for adding WebView gn piece by piece, so we don't need | 19 # This is dummy target for adding WebView gn piece by piece, so we don't need |
11 # to modify the src/BUILD.gn everytime new targets added. | 20 # to modify the src/BUILD.gn everytime new targets added. |
12 group("system_webview_apk") { | 21 group("system_webview_apk") { |
13 deps = [ | 22 deps = [ |
14 ":android_webview_java", | 23 ":android_webview_java", |
15 ":common", | 24 ":common", |
| 25 ":assets", |
| 26 ] |
| 27 } |
| 28 |
| 29 webview_repack_locales("repack_locales") { |
| 30 input_locales = locales |
| 31 output_locales = locales |
| 32 } |
| 33 |
| 34 locale_pak_resources("locale_paks") { |
| 35 sources = [ |
| 36 "$root_out_dir/android_webview/locales/am.pak", |
| 37 "$root_out_dir/android_webview/locales/ar.pak", |
| 38 "$root_out_dir/android_webview/locales/bg.pak", |
| 39 "$root_out_dir/android_webview/locales/bn.pak", |
| 40 "$root_out_dir/android_webview/locales/ca.pak", |
| 41 "$root_out_dir/android_webview/locales/cs.pak", |
| 42 "$root_out_dir/android_webview/locales/da.pak", |
| 43 "$root_out_dir/android_webview/locales/de.pak", |
| 44 "$root_out_dir/android_webview/locales/el.pak", |
| 45 "$root_out_dir/android_webview/locales/en-GB.pak", |
| 46 "$root_out_dir/android_webview/locales/en-US.pak", |
| 47 "$root_out_dir/android_webview/locales/es-419.pak", |
| 48 "$root_out_dir/android_webview/locales/es.pak", |
| 49 "$root_out_dir/android_webview/locales/et.pak", |
| 50 "$root_out_dir/android_webview/locales/fa.pak", |
| 51 "$root_out_dir/android_webview/locales/fi.pak", |
| 52 "$root_out_dir/android_webview/locales/fil.pak", |
| 53 "$root_out_dir/android_webview/locales/fr.pak", |
| 54 "$root_out_dir/android_webview/locales/gu.pak", |
| 55 "$root_out_dir/android_webview/locales/he.pak", |
| 56 "$root_out_dir/android_webview/locales/hi.pak", |
| 57 "$root_out_dir/android_webview/locales/hr.pak", |
| 58 "$root_out_dir/android_webview/locales/hu.pak", |
| 59 "$root_out_dir/android_webview/locales/id.pak", |
| 60 "$root_out_dir/android_webview/locales/it.pak", |
| 61 "$root_out_dir/android_webview/locales/ja.pak", |
| 62 "$root_out_dir/android_webview/locales/kn.pak", |
| 63 "$root_out_dir/android_webview/locales/ko.pak", |
| 64 "$root_out_dir/android_webview/locales/lt.pak", |
| 65 "$root_out_dir/android_webview/locales/lv.pak", |
| 66 "$root_out_dir/android_webview/locales/ml.pak", |
| 67 "$root_out_dir/android_webview/locales/mr.pak", |
| 68 "$root_out_dir/android_webview/locales/ms.pak", |
| 69 "$root_out_dir/android_webview/locales/nb.pak", |
| 70 "$root_out_dir/android_webview/locales/nl.pak", |
| 71 "$root_out_dir/android_webview/locales/pl.pak", |
| 72 "$root_out_dir/android_webview/locales/pt-BR.pak", |
| 73 "$root_out_dir/android_webview/locales/pt-PT.pak", |
| 74 "$root_out_dir/android_webview/locales/ro.pak", |
| 75 "$root_out_dir/android_webview/locales/ru.pak", |
| 76 "$root_out_dir/android_webview/locales/sk.pak", |
| 77 "$root_out_dir/android_webview/locales/sl.pak", |
| 78 "$root_out_dir/android_webview/locales/sr.pak", |
| 79 "$root_out_dir/android_webview/locales/sv.pak", |
| 80 "$root_out_dir/android_webview/locales/sw.pak", |
| 81 "$root_out_dir/android_webview/locales/ta.pak", |
| 82 "$root_out_dir/android_webview/locales/te.pak", |
| 83 "$root_out_dir/android_webview/locales/th.pak", |
| 84 "$root_out_dir/android_webview/locales/tr.pak", |
| 85 "$root_out_dir/android_webview/locales/uk.pak", |
| 86 "$root_out_dir/android_webview/locales/vi.pak", |
| 87 "$root_out_dir/android_webview/locales/zh-CN.pak", |
| 88 "$root_out_dir/android_webview/locales/zh-TW.pak", |
| 89 ] |
| 90 deps = [ |
| 91 ":repack_locales", |
| 92 ] |
| 93 } |
| 94 |
| 95 repack("repack_pack") { |
| 96 sources = [ |
| 97 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak"
, |
| 98 "$root_gen_dir/blink/public/resources/blink_resources.pak", |
| 99 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak", |
| 100 "$root_gen_dir/content/content_resources.pak", |
| 101 "$root_gen_dir/net/net_resources.pak", |
| 102 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak", |
| 103 "$target_gen_dir/aw_resources.pak", |
| 104 ] |
| 105 deps = [ |
| 106 ":generate_aw_resources", |
| 107 "//third_party/WebKit/public:image_resources", |
| 108 "//third_party/WebKit/public:resources", |
| 109 "//content/app/resources", |
| 110 "//content:resources", |
| 111 "//net:net_resources", |
| 112 "//ui/resources", |
| 113 ] |
| 114 output = "$target_gen_dir/webviewchromium.pak" |
| 115 } |
| 116 |
| 117 copy("rename_natives_blob") { |
| 118 sources = [ |
| 119 "$root_out_dir/natives_blob.bin", |
| 120 ] |
| 121 outputs = [ |
| 122 "$target_gen_dir/natives_blob_$arch_suffix.bin", |
| 123 ] |
| 124 deps = [ |
| 125 "//v8", |
| 126 ] |
| 127 } |
| 128 |
| 129 copy("rename_snapshot_blob") { |
| 130 sources = [ |
| 131 "$root_out_dir/snapshot_blob.bin", |
| 132 ] |
| 133 outputs = [ |
| 134 "$target_gen_dir/snapshot_blob_$arch_suffix.bin", |
| 135 ] |
| 136 deps = [ |
| 137 "//v8", |
| 138 ] |
| 139 } |
| 140 |
| 141 android_webview_assets_dir = "$root_build_dir/android_webview_assets" |
| 142 |
| 143 copy_ex("assets") { |
| 144 clear_dir = true |
| 145 dest = android_webview_assets_dir |
| 146 sources = [ |
| 147 "$target_gen_dir/webviewchromium.pak", |
| 148 ] |
| 149 deps = [ |
| 150 ":repack_pack", |
| 151 ] |
| 152 if (icu_use_data_file) { |
| 153 sources += [ "$root_build_dir/icudtl.dat" ] |
| 154 deps += [ "//third_party/icu:icudata" ] |
| 155 } |
| 156 if (v8_use_external_startup_data) { |
| 157 sources += [ |
| 158 "$target_gen_dir/natives_blob_$arch_suffix.bin", |
| 159 "$target_gen_dir/snapshot_blob_$arch_suffix.bin", |
| 160 ] |
| 161 deps += [ |
| 162 ":rename_natives_blob", |
| 163 ":rename_snapshot_blob", |
| 164 ] |
| 165 } |
| 166 } |
| 167 |
| 168 android_resources("resources") { |
| 169 resource_dirs = [ "java/res" ] |
| 170 custom_package = "org.chromium.android_webview" |
| 171 deps = [ |
| 172 ":locale_paks", |
16 ":strings_grd", | 173 ":strings_grd", |
17 ] | 174 ] |
18 } | 175 } |
19 | 176 |
20 grit("generate_aw_resources") { | 177 grit("generate_aw_resources") { |
21 source = "ui/aw_resources.grd" | 178 source = "ui/aw_resources.grd" |
22 outputs = [ | 179 outputs = [ |
23 "grit/aw_resources.h", | 180 "grit/aw_resources.h", |
24 "aw_resources.pak", | 181 "aw_resources.pak", |
25 ] | 182 ] |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 "//components/policy", | 512 "//components/policy", |
356 "//components/policy:policy_component", | 513 "//components/policy:policy_component", |
357 ] | 514 ] |
358 } | 515 } |
359 | 516 |
360 configs += [ "//v8:external_startup_data" ] | 517 configs += [ "//v8:external_startup_data" ] |
361 } | 518 } |
362 | 519 |
363 android_library("android_webview_java") { | 520 android_library("android_webview_java") { |
364 deps = [ | 521 deps = [ |
| 522 ":resources", |
365 ":strings_grd", | 523 ":strings_grd", |
366 "//base:base_java", | 524 "//base:base_java", |
367 "//components/external_video_surface:java", | 525 "//components/external_video_surface:java", |
368 "//components/navigation_interception/android:navigation_interception_java", | 526 "//components/navigation_interception/android:navigation_interception_java", |
369 "//components/web_contents_delegate_android:web_contents_delegate_android_ja
va", | 527 "//components/web_contents_delegate_android:web_contents_delegate_android_ja
va", |
370 "//content/public/android:content_java", | 528 "//content/public/android:content_java", |
371 "//net/android:net_java", | 529 "//net/android:net_java", |
372 "//ui/android:ui_java", | 530 "//ui/android:ui_java", |
373 ] | 531 ] |
374 | 532 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 "values-th/android_webview_strings.xml", | 636 "values-th/android_webview_strings.xml", |
479 "values-tl/android_webview_strings.xml", | 637 "values-tl/android_webview_strings.xml", |
480 "values-tr/android_webview_strings.xml", | 638 "values-tr/android_webview_strings.xml", |
481 "values-uk/android_webview_strings.xml", | 639 "values-uk/android_webview_strings.xml", |
482 "values-vi/android_webview_strings.xml", | 640 "values-vi/android_webview_strings.xml", |
483 "values-zh-rCN/android_webview_strings.xml", | 641 "values-zh-rCN/android_webview_strings.xml", |
484 "values-zh-rTW/android_webview_strings.xml", | 642 "values-zh-rTW/android_webview_strings.xml", |
485 "values/android_webview_strings.xml", | 643 "values/android_webview_strings.xml", |
486 ] | 644 ] |
487 } | 645 } |
OLD | NEW |