Commit 753eeddd authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Don't check public apk proguard expectations when downstream play services is present

Noticed that the expectations were failing for no-op builds because of
this.

Bug: 882524
Change-Id: If0297c5e0ae0db61529089b6afbaaa430fa1ee01
Reviewed-on: https://chromium-review.googlesource.com/c/1407597
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622173}
parent 9e40d051
......@@ -5,7 +5,6 @@
# found in the LICENSE file.
import difflib
import itertools
def DiffFileContents(expected_path, actual_path, description):
......@@ -24,9 +23,16 @@ def DiffFileContents(expected_path, actual_path, description):
tofile=actual_path,
n=0)
return '\n'.join(
itertools.chain(
diff, ('Detected {} change.'.format(description),
'If this is expected, please update the file by running:',
'cp {} {}'.format(actual_path, expected_path),
'Otherwise please fix the issue before submitting a CL')))
return """
Detected change in {}.
If change is expected, please update the expectations by running:
cd out/Release
cp {} {}
If you have hit this error on a bot and the error is for a public target,
build locally with enable_chrome_android_internal=false.
Here is the diff:
{}
""".format(description, actual_path, expected_path, '\n'.join(diff))
......@@ -1485,7 +1485,10 @@ template("chrome_public_apk_or_module_tmpl") {
chrome_public_apk_or_module_tmpl("chrome_public_apk") {
target_type = "android_apk"
apk_name = "ChromePublic"
if (!is_java_debug) {
# Having //clank present causes different flags because of how play services
# is wired up.
if (!is_java_debug && !enable_chrome_android_internal) {
proguard_expectations_file =
"//chrome/android/java/chrome_public_apk.proguard_flags.expected"
}
......@@ -1495,7 +1498,10 @@ chrome_public_apk_or_module_tmpl("chrome_modern_public_apk") {
target_type = "android_apk"
apk_name = "ChromeModernPublic"
is_modern = true
if (!is_java_debug) {
# Having //clank present causes different flags because of how play services
# is wired up.
if (!is_java_debug && !enable_chrome_android_internal) {
proguard_expectations_file =
"//chrome/android/java/chrome_modern_public_apk.proguard_flags.expected"
}
......@@ -1590,7 +1596,10 @@ template("monochrome_public_apk_or_module_tmpl") {
monochrome_public_apk_or_module_tmpl("monochrome_public_apk") {
apk_name = "MonochromePublic"
target_type = "android_apk"
if (!is_java_debug) {
# Having //clank present causes different flags because of how play services
# is wired up.
if (!is_java_debug && !enable_chrome_android_internal) {
proguard_expectations_file =
"//chrome/android/java/monochrome_public_apk.proguard_flags.expected"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment