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

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

Issue 1138953003: Extract apkbuilder build action into a .gypi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split-manifest
Patch Set: rebased Created 5 years, 7 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/android/apkbuilder_action.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/internal_rules.gni
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 2a7a8921ed37fbd994a208877a58ec7ab52a0bca..4bafd020f2b03e0337a7a2abffc318f07daf331e 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -534,10 +534,12 @@ template("create_apk") {
depfile = "$target_gen_dir/$target_name.d"
inputs = [
- _dex_path,
_resource_packaged_apk_path,
_ant_script,
]
+ if (defined(_dex_path)) {
+ inputs += [ _dex_path ]
+ }
outputs = [
depfile,
@@ -549,7 +551,6 @@ template("create_apk") {
rebase_path(_resource_packaged_apk_path, root_build_dir)
_rebased_packaged_apk_path = rebase_path(_packaged_apk_path, root_build_dir)
_rebased_native_libs_dir = rebase_path(_native_libs_dir, root_build_dir)
- _rebased_dex_path = rebase_path(_dex_path, root_build_dir)
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
@@ -564,11 +565,19 @@ template("create_apk") {
"-DUNSIGNED_APK_PATH=$_rebased_packaged_apk_path",
"-DEMMA_INSTRUMENT=0",
"-DEMMA_DEVICE_JAR=$_rebased_emma_jar",
- "-DDEX_FILE_PATH=$_rebased_dex_path",
"-Dbasedir=.",
"-buildfile",
rebase_path(_ant_script, root_build_dir),
]
+ if (defined(_dex_path)) {
+ _rebased_dex_path = rebase_path(_dex_path, root_build_dir)
+ args += [
+ "-DDEX_FILE_PATH=$_rebased_dex_path",
+ "-DHAS_CODE=true",
+ ]
+ } else {
+ args += [ "-DHAS_CODE=false" ]
+ }
}
action("${target_name}__finalize") {
« no previous file with comments | « build/android/apkbuilder_action.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698