summaryrefslogtreecommitdiffstats
path: root/core/proguard_basic_keeps.flags
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-05-04 19:21:48 -0700
committerYing Wang <wangying@google.com>2015-05-05 17:35:12 +0000
commit4f5d0e60b441f009f78ef6595172ffa11dd69a2d (patch)
tree68397b48f929bc8c6d16d54efc7cb35ce9883758 /core/proguard_basic_keeps.flags
parent5c73ba6e037f3e145fcc84ad2329a002ddb3bf54 (diff)
downloadbuild-4f5d0e60b441f009f78ef6595172ffa11dd69a2d.zip
build-4f5d0e60b441f009f78ef6595172ffa11dd69a2d.tar.gz
build-4f5d0e60b441f009f78ef6595172ffa11dd69a2d.tar.bz2
Raise SDK version for ProGuard processing when app links support library.
When an app's LOCAL_SDK_VERSION is lower than the support library's LOCAL_SDK_VERSION, we artifically raises the "SDK version" "linked" by ProGuard, to - suppress ProGuard warnings of referencing symbols unknown to the lower SDK version. - prevent ProGuard stripping subclass in the support library that extends class added in the higher SDK version. This allows us to remove the dangerous ProGuard flag "-dontwarn android.support.**". Notes: - We don't raise the app's LOCAL_SDK_VERSION, so that the app's own code is still unable to use the higher SDK version. - For platform build, we can't just raise to the "current" SDK, because would break apps that use APIs removed from the current SDK. We raise it to framework.jar instead, which contains the most complete symbol set. Bug: 20658265 Change-Id: I90099073457a65cb8031fbaec6b396d68ce614a7 (cherry picked from commit 8e8d1e7abadb53d5dcb211fac6ab6ed20f5dc9ac)
Diffstat (limited to 'core/proguard_basic_keeps.flags')
-rw-r--r--core/proguard_basic_keeps.flags7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/proguard_basic_keeps.flags b/core/proguard_basic_keeps.flags
index 4a85db0..6b3715a 100644
--- a/core/proguard_basic_keeps.flags
+++ b/core/proguard_basic_keeps.flags
@@ -58,7 +58,12 @@
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
# See proguard-android.txt in the SDK package.
--dontwarn android.support.**
+#
+# DO NOT USE THIS: We figured it's dangerous to blindly ignore all support library warnings.
+# ProGuard may strip members of subclass of unknown super classes, in case an app is linking against
+# LOCAL_SDK_VERSION lower than the support library's LOCAL_SDK_VERSION.
+# See bug/20658265.
+# -dontwarn android.support.**
# Less spammy.
-dontnote