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

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

Issue 1338813003: GN: Side-load dex files as well as native code in incremental installs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix pylint warnings Created 5 years, 3 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
Index: build/config/android/rules.gni
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index 6f32c9c2d755d5bb3019c1a52c5ff9b3daf9fad7..e9d5384d4fdb3d44ea03a73af2f191abb2420f7a 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1150,7 +1150,9 @@ template("android_apk") {
_build_config = "$target_gen_dir/$target_name.build_config"
resources_zip_path = "$base_path.resources.zip"
_all_resources_zip_path = "$base_path.resources.all.zip"
- jar_path = "$base_path.jar"
+ _jar_path = "$base_path.jar"
+ _lib_dex_path = "$base_path.dex.jar"
+ _rebased_lib_dex_path = rebase_path(_lib_dex_path, root_build_dir)
_template_name = target_name
final_dex_path = "$gen_dir/classes.dex"
@@ -1286,6 +1288,7 @@ template("android_apk") {
write_build_config(build_config_target) {
forward_variables_from(invoker, [ "apk_under_test" ])
type = "android_apk"
+ jar_path = _jar_path
dex_path = final_dex_path
resources_zip = resources_zip_path
build_config = _build_config
@@ -1378,7 +1381,8 @@ template("android_apk") {
java_files = []
}
srcjar_deps = _srcjar_deps
- dex_path = base_path + ".dex.jar"
+ jar_path = _jar_path
+ dex_path = _lib_dex_path
if (defined(invoker.deps)) {
deps += invoker.deps
@@ -1410,8 +1414,8 @@ template("android_apk") {
rebase_path(_dist_jar_path, root_build_dir),
"--inputs=@FileArg($_rebased_build_config:dist_jar:dependency_jars)",
]
- inputs += [ jar_path ]
- _rebased_jar_path = rebase_path([ jar_path ], root_build_dir)
+ inputs += [ _jar_path ]
+ _rebased_jar_path = rebase_path([ _jar_path ], root_build_dir)
args += [ "--inputs=$_rebased_jar_path" ]
deps = [
":$build_config_target", # Generates the build config file.
@@ -1425,15 +1429,15 @@ template("android_apk") {
":$build_config_target",
":$java_target",
]
- sources = [
- jar_path,
- ]
inputs = [
_build_config,
]
output = final_dex_path
- dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files"
- args = [ "--inputs=@FileArg($dex_arg_key)" ]
+ _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files"
+ args = [
+ "--inputs=@FileArg($_dex_arg_key)",
+ _rebased_lib_dex_path,
+ ]
}
if (_native_libs != []) {
@@ -1587,7 +1591,7 @@ 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"
+ script = "//build/android/incremental_install/create_install_script.py"
depfile = "$target_gen_dir/$target_name.d"
_generated_script_path =
@@ -1602,9 +1606,12 @@ template("android_apk") {
_rebased_generated_script_path =
rebase_path(_generated_script_path, root_build_dir)
_rebased_depfile = rebase_path(depfile, root_build_dir)
+ _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files"
args = [
"--apk-path=${_rebased_apk_path_no_ext}_incremental.apk",
"--script-output-path=$_rebased_generated_script_path",
+ "--dex-file=$_rebased_lib_dex_path",
+ "--dex-file-list=@FileArg($_dex_arg_key)",
"--depfile=$_rebased_depfile",
]
if (defined(_native_libs_dir)) {
« build/config/android/internal_rules.gni ('K') | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698