Index: build/config/android/rules.gni |
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni |
index c9388af8fd7d866b8ef653726d50607fa4ee1cd9..f3e41578d6c7690cdda1ef6af781d1141cb1a7bf 100644 |
--- a/build/config/android/rules.gni |
+++ b/build/config/android/rules.gni |
@@ -580,6 +580,8 @@ template("locale_pak_resources") { |
# shared_resources: If true make a resource package that can be loaded by a |
# different application at runtime to access the package's resources. |
# |
agrieve
2015/12/30 15:12:16
nit: Remove blank line (feel free to remove the on
michaelbai
2015/12/30 18:54:15
Done.
|
+# app_as_shared_lib: If true make a resource package that can be loaded as |
+# both shared_resources and normal application. |
# Example: |
# android_resources("foo_resources") { |
@@ -635,6 +637,7 @@ template("android_resources") { |
deps = [] |
forward_variables_from(invoker, |
[ |
+ "app_as_shared_lib", |
"android_manifest", |
"custom_package", |
"deps", |
@@ -1182,6 +1185,10 @@ template("android_java_prebuilt") { |
# and (possibly) native libraries. |
# |
# Variables |
+# alternative_android_sdk_jar: The alternative android sdk jar used in |
+# proguard. |
+# android_aapt_path: Android aapt tool to replace default one to build |
+# resource. |
# android_manifest: Path to AndroidManifest.xml. |
# android_manifest_dep: Target that generates AndroidManifest (if applicable) |
# chromium_code: If true, extra analysis warning/errors will be enabled. |
@@ -1409,6 +1416,8 @@ template("android_apk") { |
process_resources(process_resources_target) { |
forward_variables_from(invoker, |
[ |
+ "android_aapt_path", |
+ "app_as_shared_lib", |
"include_all_resources", |
"shared_resources", |
]) |
@@ -1557,6 +1566,9 @@ template("android_apk") { |
"--tested-apk-info=@FileArg($_rebased_build_config:proguard:tested_apk_info)", |
"--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", |
] |
+ if (defined(invoker.alternative_android_sdk_jar)) { |
agrieve
2015/12/30 15:12:16
nit: use forward_variables_from()
michaelbai
2015/12/30 18:54:15
Done.
|
+ alternative_android_sdk_jar = invoker.alternative_android_sdk_jar |
+ } |
} |
_dex_sources = [ _proguard_jar_path ] |
_dex_deps = [ ":$_proguard_target" ] |
@@ -1669,6 +1681,8 @@ template("android_apk") { |
deps = [] |
forward_variables_from(invoker, |
[ |
+ "android_aapt_path", |
+ "app_as_shared_lib", |
"deps", |
"extensions_to_not_compress", |
"language_splits", |
@@ -1761,6 +1775,7 @@ template("android_apk") { |
deps = [] |
forward_variables_from(invoker, |
[ |
+ "android_aapt_path", |
"deps", |
"native_lib_placeholders", |
"public_deps", |