Index: build/config/android/internal_rules.gni |
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
index e4a4e2d1f6fc59e6ee3bef81c3e738ba0de107da..8cc247bb59c17c64b87d34965a347bd890302573 100644 |
--- a/build/config/android/internal_rules.gni |
+++ b/build/config/android/internal_rules.gni |
@@ -41,6 +41,8 @@ _java_target_blacklist = [ |
"*:*_unpack_aar", |
] |
+_default_proguard_jar_path = "//third_party/proguard/lib/proguard.jar" |
+ |
# Write the target's .build_config file. This is a json file that contains a |
# dictionary of information about how to build this target (things that |
# require knowledge about this target's dependencies and cannot be calculated |
@@ -762,7 +764,7 @@ if (enable_java_templates) { |
if (defined(invoker.proguard_jar_path)) { |
_proguard_jar_path = invoker.proguard_jar_path |
} else { |
- _proguard_jar_path = "//third_party/proguard/lib/proguard.jar" |
+ _proguard_jar_path = _default_proguard_jar_path |
} |
_output_jar_path = invoker.output_jar_path |
inputs = [ |
@@ -938,10 +940,19 @@ if (enable_java_templates) { |
main_dex_rules = "//build/android/main_dex_classes.flags" |
+ if (defined(invoker.proguard_jar_path)) { |
+ _proguard_jar_path = invoker.proguard_jar_path |
+ } else { |
+ _proguard_jar_path = _default_proguard_jar_path |
+ } |
+ |
if (!defined(inputs)) { |
inputs = [] |
} |
- inputs += [ main_dex_rules ] |
+ inputs += [ |
+ main_dex_rules, |
+ _proguard_jar_path, |
+ ] |
outputs = [ |
_main_dex_list_path, |
@@ -956,6 +967,8 @@ if (enable_java_templates) { |
rebase_path(_main_dex_list_path, root_build_dir), |
"--main-dex-rules-path", |
rebase_path(main_dex_rules, root_build_dir), |
+ "--proguard-path", |
+ rebase_path(_proguard_jar_path, root_build_dir), |
] |
if (defined(invoker.extra_main_dex_proguard_config)) { |