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

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

Issue 1140763002: Extract package_resources step into a .gypi & make assets & resource zips optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@apkbuilder
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/package_resources_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..0c6f5074b3c316b1307df068bd02c05820c2a003 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -449,8 +449,13 @@ template("create_apk") {
_android_manifest = invoker.android_manifest
_base_path = invoker.base_path
_final_apk_path = invoker.apk_path
- _resources_zip = invoker.resources_zip
- _dex_path = invoker.dex_path
+
+ if (defined(invoker.resources_zip)) {
+ _resources_zip = invoker.resources_zip
+ }
+ if (defined(invoker.dex_path)) {
+ _dex_path = invoker.dex_path
+ }
_keystore_path = invoker.keystore_path
_keystore_name = invoker.keystore_name
_keystore_password = invoker.keystore_password
@@ -466,7 +471,6 @@ template("create_apk") {
_native_libs_dir = invoker.native_libs_dir
}
- _asset_location = "//build/android/empty/res"
if (defined(invoker.asset_location)) {
_asset_location = invoker.asset_location
}
@@ -493,14 +497,15 @@ template("create_apk") {
depfile = "${target_gen_dir}/${target_name}.d"
inputs = [
_android_manifest,
- _resources_zip,
]
+ if (defined(_resources_zip)) {
+ inputs += [ _resources_zip ]
+ }
outputs = [
depfile,
_resource_packaged_apk_path,
]
- _rebased_resources_zips = [ rebase_path(_resources_zip, root_build_dir) ]
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
@@ -515,13 +520,22 @@ template("create_apk") {
_version_code,
"--version-name",
_version_name,
- "--asset-dir",
- rebase_path(_asset_location, root_build_dir),
- "--resource-zips=$_rebased_resources_zips",
"--apk-path",
rebase_path(_resource_packaged_apk_path, root_build_dir),
]
+ if (defined(_asset_location)) {
+ args += [
+ "--asset-dir",
+ rebase_path(_asset_location, root_build_dir),
+ ]
+ }
+ if (defined(_resources_zip)) {
+ args += [
+ "--resource-zips",
+ rebase_path(_resources_zip, root_build_dir),
+ ]
+ }
if (_shared_resources) {
args += [ "--shared-resources" ]
}
« no previous file with comments | « build/android/package_resources_action.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698