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/config/locales.gni") |
8 | 8 |
9 template("system_webview_apk_tmpl") { | 9 template("system_webview_apk_tmpl") { |
10 android_apk(target_name) { | 10 android_apk(target_name) { |
11 forward_variables_from(invoker, "*") | 11 forward_variables_from(invoker, "*") |
12 | 12 |
13 deps += [ | 13 if (!defined(webview_stub_only)) { |
14 "//android_webview:assets", | 14 webview_stub_only = false |
15 "//base:base_java", | 15 } |
16 ] | 16 |
| 17 deps += [ "//base:base_java" ] |
17 | 18 |
18 if (!defined(alternative_android_sdk_jar)) { | 19 if (!defined(alternative_android_sdk_jar)) { |
19 alternative_android_sdk_jar = webview_framework_jar | 20 alternative_android_sdk_jar = webview_framework_jar |
20 } | 21 } |
21 | 22 |
22 shared_resources = true | 23 shared_resources = true |
23 shared_libraries = [ "//android_webview:libwebviewchromium" ] | |
24 native_lib_version_rule = "//build/util:chrome_version_json" | 24 native_lib_version_rule = "//build/util:chrome_version_json" |
25 _native_lib_file = | 25 _native_lib_file = |
26 rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir) | 26 rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir) |
27 native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)" | 27 native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)" |
28 if (build_apk_secondary_abi && android_64bit_target_cpu) { | 28 |
29 secondary_abi_shared_libraries = [ "//android_webview:libwebviewchromium($
android_secondary_abi_toolchain)" ] | 29 if (webview_stub_only) { |
| 30 unpackaged_shared_libraries = [ "libmonochrome.so" ] |
| 31 } else { |
| 32 deps += [ "//android_webview:assets" ] |
| 33 |
| 34 shared_libraries = [ "//android_webview:libwebviewchromium" ] |
| 35 if (build_apk_secondary_abi && android_64bit_target_cpu) { |
| 36 secondary_abi_shared_libraries = [ "//android_webview:libwebviewchromium
($android_secondary_abi_toolchain)" ] |
| 37 } |
30 } | 38 } |
| 39 |
31 aapt_locale_whitelist = locales | 40 aapt_locale_whitelist = locales |
32 | 41 |
33 if (!is_java_debug) { | 42 if (!is_java_debug) { |
34 proguard_enabled = true | 43 proguard_enabled = true |
35 if (!defined(proguard_configs)) { | 44 if (!defined(proguard_configs)) { |
36 proguard_configs = [] | 45 proguard_configs = [] |
37 } | 46 } |
38 proguard_configs += [ | 47 proguard_configs += [ |
39 "//android_webview/apk/java/proguard.flags", | 48 "//android_webview/apk/java/proguard.flags", |
40 "//base/android/proguard/chromium_apk.flags", | 49 "//base/android/proguard/chromium_apk.flags", |
41 "//base/android/proguard/chromium_code.flags", | 50 "//base/android/proguard/chromium_code.flags", |
42 ] | 51 ] |
43 } | 52 } |
44 } | 53 } |
45 } | 54 } |
OLD | NEW |