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 17:35:12 +0000 (17:35 +0000)
commit4f5d0e60b441f009f78ef6595172ffa11dd69a2d
tree68397b48f929bc8c6d16d54efc7cb35ce9883758
parent5c73ba6e037f3e145fcc84ad2329a002ddb3bf54
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)
core/java.mk
core/proguard_basic_keeps.flags