blob: 5722c243e191ef1aeb2254799417b9c9a5660ee1 [file] [log] [blame]
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/chrome_version.gni")
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
trichrome_library_package = "org.chromium.trichromelibrary"
trichrome_certdigest =
"1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00"
trichrome_jinja_variables = [
"min_sdk_version=28",
"target_sdk_version=$android_sdk_version",
"trichrome_library=$trichrome_library_package",
"trichrome_version=$android_default_version_code",
"trichrome_certdigest=$trichrome_certdigest",
]
template("trichrome_library_apk_tmpl") {
android_apk(target_name) {
forward_variables_from(invoker,
[
"apk_name",
"android_manifest",
"android_manifest_dep",
])
# TODO(torne): this contains the list of locales amongst other things.
# Skip building it because the version in the library won't be used anyway;
# the one in the main APK will take precedence.
generate_buildconfig_java = false
# TODO(torne): since there's no real java code in the library right now,
# leave out the build hooks and let them get compiled into each APK. Later
# this should probably be in the library.
no_build_hooks = true
alternative_android_sdk_dep = webview_framework_dep
app_as_shared_lib = true
use_chromium_linker = false
uncompress_shared_libraries = true
version_name = chrome_version_name
# Only try to generate the native library version in configurations that
# include a native library.
if (!android_64bit_target_cpu || build_apk_secondary_abi) {
_native_lib_file =
rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
native_lib_version_rule = "//build/util:chrome_version_json"
}
if (android_64bit_target_cpu) {
# Include a 64-bit placeholder library to ensure that the library is treated
# as multiarch and gets its Java code precompiled for both architectures.
native_lib_placeholders = [ "libdummy.so" ]
if (build_apk_secondary_abi) {
# Include the actual 32-bit libmonochrome library.
secondary_abi_shared_libraries =
[ "//chrome/android:monochrome_secondary_abi_lib" ]
}
} else {
shared_libraries = [ "//chrome/android:monochrome" ]
}
}
}