blob: 33e9c76f386f9bcd804e8280cee8bad77bafde6f [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("//base/android/linker/config.gni")
import("//build/config/android/rules.gni")
import("//build/config/locales.gni")
import("//chrome/android/features/module_names_to_package_ids.gni")
import("//device/vr/buildflags/buildflags.gni")
assert(enable_vr)
template("vr_module_tmpl") {
assert(defined(invoker.version_code))
assert(defined(invoker.version_name))
assert(defined(invoker.manifest_package))
assert(defined(invoker.module_name))
assert(defined(invoker.base_module_target))
_manifest = "$target_gen_dir/$target_name/AndroidManifest.xml"
_manifest_target = "${target_name}__manifest"
jinja_template(_manifest_target) {
input = "//chrome/android/features/vr/java/AndroidManifest.xml"
output = _manifest
variables = [
"target_sdk_version=$android_sdk_version",
"manifest_package=${invoker.manifest_package}",
]
}
android_app_bundle_module(target_name) {
forward_variables_from(invoker,
[
"base_module_target",
"module_name",
"uncompress_shared_libraries",
"version_code",
"version_name",
])
android_manifest = _manifest
android_manifest_dep = ":${_manifest_target}"
deps = [
"//chrome/android/features/vr:java",
]
proguard_enabled = !is_java_debug
if (!defined(invoker.uncompress_shared_libraries)) {
uncompress_shared_libraries = chromium_linker_supported
}
# Don't embed more localized strings than required (http://crbug.com/932017)
aapt_locale_whitelist = locales
package_name = "vr"
package_name_to_id_mapping = resource_packages_id_mapping
}
}