Commit bf9b3570 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Move manifest_merger into its own GN template

No behaviour changes.

Change-Id: I758665a5dfb20dce35394d083f7f2a9fc82115c0
Reviewed-on: https://chromium-review.googlesource.com/894474
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533296}
parent 21d829f8
......@@ -1409,7 +1409,41 @@ if (enable_java_templates) {
}
}
# Runs process_resources.py
template("merge_manifests") {
action(target_name) {
forward_variables_from(invoker,
[
"deps",
"testonly",
])
script = "//build/android/gyp/merge_manifest.py"
depfile = "$target_gen_dir/$target_name.d"
inputs = [
invoker.build_config,
invoker.input_manifest,
]
outputs = [
invoker.output_manifest,
]
_rebased_build_config = rebase_path(invoker.build_config, root_build_dir)
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
"--build-vars",
rebase_path(android_build_vars, root_build_dir),
"--root-manifest",
rebase_path(invoker.input_manifest, root_build_dir),
"--output",
rebase_path(invoker.output_manifest, root_build_dir),
"--extras",
"@FileArg($_rebased_build_config:extra_android_manifests)",
]
}
}
template("process_resources") {
_process_resources_target_name = target_name
if (defined(invoker.srcjar_path)) {
......
......@@ -1961,31 +1961,10 @@ if (enable_java_templates) {
_android_manifest =
"$target_gen_dir/${_template_name}_manifest/AndroidManifest.xml"
_merge_manifest_target = "${_template_name}__merge_manifests"
action(_merge_manifest_target) {
script = "//build/android/gyp/merge_manifest.py"
depfile = "$target_gen_dir/$target_name.d"
sources = [
_android_root_manifest,
]
outputs = [
_android_manifest,
]
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
"--build-vars",
rebase_path(android_build_vars, root_build_dir),
"--root-manifest",
rebase_path(_android_root_manifest, root_build_dir),
"--output",
rebase_path(_android_manifest, root_build_dir),
"--extras",
"@FileArg($_rebased_build_config:extra_android_manifests)",
]
merge_manifests(_merge_manifest_target) {
input_manifest = _android_root_manifest
output_manifest = _android_manifest
build_config = _build_config
deps = _android_root_manifest_deps + [ ":$_build_config_target" ]
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment