OSDN Git Service

Raise SDK version for ProGuard processing when app links support library.
authorYing Wang <wangying@google.com>
Tue, 5 May 2015 02:21:48 +0000 (19:21 -0700)
committerYing Wang <wangying@google.com>
Tue, 5 May 2015 02:30:23 +0000 (19:30 -0700)
commit8e8d1e7abadb53d5dcb211fac6ab6ed20f5dc9ac
tree48c1cddcbe781034564a78e4464d2a33b87c803f
parent9874d97b32ddbfe8d154b2249e5446fda9ddad9e
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
core/java.mk
core/proguard_basic_keeps.flags