blob: ac859e1b26dc9a8760df16b9e08b8acf4703eeee [file] [log] [blame]
# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
import("//build/config/locales.gni")
import("//components/crash/android/silent_java_assert_reporting.gni")
import("//device/vr/buildflags/buildflags.gni")
template("system_webview_bundle") {
_is_trichrome = defined(invoker.is_trichrome) && invoker.is_trichrome
assert(_is_trichrome == defined(invoker.static_library_provider))
android_app_bundle(target_name) {
command_line_flags_file = "webview-command-line"
if (!is_java_debug) {
proguard_enabled = true
repackage_classes = "WV"
}
# TODO(crbug.com/41486995): Set this back to true once split translations
# are working again.
enable_language_splits = false
if (_is_trichrome) {
min_sdk_version = 29
}
system_image_locale_allowlist = platform_pak_locales
is_multi_abi =
android_64bit_target_cpu && (!defined(invoker.include_64_bit_webview) ||
invoker.include_64_bit_webview) &&
(!defined(invoker.include_32_bit_webview) ||
invoker.include_32_bit_webview)
if (!defined(proguard_android_sdk_dep)) {
proguard_android_sdk_dep = webview_framework_dep
}
if (enable_silent_java_assert_reporting) {
custom_assertion_handler = crash_reporting_assertion_handler
}
# For this to be respected, it must also be set on the base module target.
strip_unused_resources = is_official_build
forward_variables_from(invoker, "*")
}
}