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

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

Issue 2031033002: Adding option for Proguard jar to be switched. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Findbugs suppression Created 4 years, 6 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 6bc82e19f2c8a7a73f3bc69319cf5fd255099409..826d3f029a9a7e0c86bd5ca68044507408058c35 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1278,9 +1278,11 @@ template("android_java_prebuilt") {
# requires_sdk_api_level_23: If defined and true, the apk is intended for
# installation only on Android M or later. In these releases the system
# linker does relocation unpacking, so we can enable it unconditionally.
-# secondary_native_libs: the path of native libraries for secondary app abi.
+# secondary_native_libs: The path of native libraries for secondary app abi.
# run_findbugs_override: Forces run_findbugs on or off. If undefined, the
# default will use the build arg run_findbugs.
+# proguard_jar_path: The path to proguard.jar you wish to use. If undefined,
+# the proguard used will be the checked in one in //third_party/proguard.
#
# Example
# android_apk("foo_apk") {
@@ -1437,7 +1439,7 @@ template("android_apk") {
_proguard_enabled =
defined(invoker.proguard_enabled) && invoker.proguard_enabled
if (_proguard_enabled) {
- _proguard_jar_path = "$base_path.proguard.jar"
+ _proguard_output_jar_path = "$base_path.proguard.jar"
}
_emma_never_instrument = defined(invoker.testonly) && invoker.testonly
@@ -1472,7 +1474,7 @@ template("android_apk") {
proguard_enabled = _proguard_enabled
if (_proguard_enabled) {
- proguard_info = "$_proguard_jar_path.info"
+ proguard_info = "$_proguard_output_jar_path.info"
}
native_libs = _native_libs
@@ -1558,6 +1560,9 @@ template("android_apk") {
if (enable_multidex) {
defines += [ "ENABLE_MULTIDEX" ]
}
+ if (is_java_debug) {
+ defines += [ "DEBUG" ]
+ }
}
_srcjar_deps += [ ":${_template_name}__build_config_java" ]
}
@@ -1629,7 +1634,11 @@ template("android_apk") {
}
_proguard_target = "${_template_name}__proguard"
proguard(_proguard_target) {
- forward_variables_from(invoker, [ "alternative_android_sdk_jar" ])
+ forward_variables_from(invoker,
+ [
+ "alternative_android_sdk_jar",
+ "proguard_jar_path",
+ ])
deps = [
":$build_config_target",
":$java_target",
@@ -1640,7 +1649,7 @@ template("android_apk") {
_jar_path,
] + _proguard_configs
- output_jar_path = _proguard_jar_path
+ output_jar_path = _proguard_output_jar_path
_rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir)
args = [
"--proguard-configs=$_rebased_proguard_configs",
@@ -1659,7 +1668,7 @@ template("android_apk") {
args += [ "--tested-apk-info=@FileArg($_rebased_apk_under_test_build_config:deps_info:proguard_info)" ]
}
}
- _dex_sources = [ _proguard_jar_path ]
+ _dex_sources = [ _proguard_output_jar_path ]
_dex_deps = [ ":$_proguard_target" ]
} else {
if (enable_multidex) {

Powered by Google App Engine
This is Rietveld 408576698