Chromium Code Reviews| Index: build/config/android/rules.gni |
| diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni |
| index 53330d100c5eea7bc34b4ff37067630aaa4edddb..5f6a4f1e14504a58d29992aaaa6222b4bfaa17b6 100644 |
| --- a/build/config/android/rules.gni |
| +++ b/build/config/android/rules.gni |
| @@ -1382,6 +1382,10 @@ template("android_apk") { |
| [ _final_apk_path ], |
| "$root_build_dir/test.lib.java/{{source_name_part}}.jar") |
| _dist_jar_path = _dist_jar_path_list[0] |
| + _final_apk_path_no_ext_list = |
|
jbudorick
2015/08/23 02:01:28
Are these only used in the managed_create_script a
agrieve
2015/08/26 00:22:40
It's used at line 1785 as well.
|
| + process_file_template([ _final_apk_path ], |
| + "{{source_dir}}/{{source_name_part}}") |
| + _final_apk_path_no_ext = _final_apk_path_no_ext_list[0] |
| _native_libs = [] |
| @@ -1484,6 +1488,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) |
| @@ -1715,7 +1721,7 @@ template("android_apk") { |
| dex_path = final_dex_path |
| load_library_from_apk = _load_library_from_apk |
| create_density_splits = _create_density_splits |
| - if (defined(invoker.language_splits)) { |
| + if (_create_language_splits) { |
| language_splits = invoker.language_splits |
| } |
| if (defined(invoker.extensions_to_not_compress)) { |
| @@ -1772,12 +1778,11 @@ template("android_apk") { |
| _apk_rule = "${_template_name}__split_apk_abi_${android_app_abi}" |
| _final_deps += [ ":$_apk_rule" ] |
| - _managed_final_deps += [ ":${_apk_rule}_managed" ] |
| + |
| + # Don't add this to _managed_final_deps since for managed installs we skip |
| + # abi splits altogether. |
| create_apk(_apk_rule) { |
| - _split_paths = process_file_template( |
| - [ _final_apk_path ], |
| - "{{source_dir}}/{{source_name_part}}-abi-${android_app_abi}.apk") |
| - apk_path = _split_paths[0] |
| + apk_path = "${_final_apk_path_no_ext}-abi-${android_app_abi}.apk" |
| base_path = "$gen_dir/$_apk_rule" |
| manifest_outputs = get_target_outputs(":${_manifest_rule}") |
| @@ -1799,6 +1804,41 @@ template("android_apk") { |
| } |
| } |
| + _managed_create_script_rule_name = "${_template_name}__managed_script" |
| + _managed_final_deps += [ ":${_managed_create_script_rule_name}" ] |
| + action(_managed_create_script_rule_name) { |
|
jbudorick
2015/08/23 02:01:28
nit: create_managed_script_rule_name?
agrieve
2015/08/26 00:22:40
Done.
|
| + script = "//build/android/gyp/create_managed_install_script.py" |
| + depfile = "$target_gen_dir/$target_name.d" |
| + |
| + _generated_script_path = |
| + "${root_out_dir}/bin/install_managed_${_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}_managed.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) { |
| deps = _final_deps |
| if (defined(invoker.data_deps)) { |