Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: build/config/android/rules.gni

Issue 1291793007: GN(android): Add scripts & runtime logic for installing _managed apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-managed-install
Patch Set: fix compile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/rules.gni
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index df0f4bf0423e60325d5de8efa6736b3791d699e1..251c7eb1365f1acaf51b2f26f23841fe4b7ee20f 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1271,6 +1271,8 @@ template("android_apk") {
defined(invoker.create_abi_split) && invoker.create_abi_split
_create_density_splits =
defined(invoker.create_density_splits) && invoker.create_density_splits
+ _create_language_splits =
+ defined(invoker.language_splits) && invoker.language_splits != []
# Help GN understand that _create_abi_split is not unused (bug in GN).
assert(_create_abi_split || true)
@@ -1577,6 +1579,41 @@ template("android_apk") {
}
}
+ _create_incremental_script_rule_name = "${_template_name}__incremental_script"
+ _incremental_final_deps += [ ":${_create_incremental_script_rule_name}" ]
+ action(_create_incremental_script_rule_name) {
+ script = "//build/android/gn/create_incremental_install_script.py"
+ depfile = "$target_gen_dir/$target_name.d"
+
+ _generated_script_path =
+ "${root_out_dir}/bin/install_incremental_${_template_name}"
+ outputs = [
+ depfile,
+ _generated_script_path,
+ ]
+
+ _rebased_apk_path_no_ext =
+ rebase_path(_final_apk_path_no_ext, root_build_dir)
+ _rebased_generated_script_path =
+ rebase_path(_generated_script_path, root_build_dir)
+ _rebased_depfile = rebase_path(depfile, root_build_dir)
+ args = [
+ "--apk-path=${_rebased_apk_path_no_ext}_incremental.apk",
+ "--script-output-path=$_rebased_generated_script_path",
+ "--depfile=$_rebased_depfile",
+ ]
+ if (defined(_native_libs_dir)) {
+ _rebased_native_libs_dir = rebase_path(_native_libs_dir, root_build_dir)
+ args += [ "--lib-dir=$_rebased_native_libs_dir/$android_app_abi" ]
+ }
+ if (_create_density_splits) {
+ args += [ "--split=${_rebased_apk_path_no_ext}-density-*.apk" ]
+ }
+ if (_create_language_splits) {
+ args += [ "--split=${_rebased_apk_path_no_ext}-language-*.apk" ]
+ }
+ }
+
group(target_name) {
forward_variables_from(invoker, [ "data_deps" ])
deps = _final_deps
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698