summaryrefslogtreecommitdiffstats
path: root/core/java.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-06-26 12:33:06 -0700
committerYing Wang <wangying@google.com>2015-06-26 19:37:28 +0000
commit742f5832b16328372d47ae062b3ab946ff37b6f6 (patch)
tree7e057316b2e76bf8185ef0e3ec1250c2ee0126af /core/java.mk
parentaae1a0ba48d32224aa11980610bcc318eef38dd9 (diff)
downloadbuild-742f5832b16328372d47ae062b3ab946ff37b6f6.zip
build-742f5832b16328372d47ae062b3ab946ff37b6f6.tar.gz
build-742f5832b16328372d47ae062b3ab946ff37b6f6.tar.bz2
Raise progaurd library to platform libraries even for "current" SDK.
Without this change, if an app with "LOCAL_SDK_VERSION := current" links against a static library that uses removed APIs, the app will fail ProGuard processing because the removed APIs can't be found in the current SDK. This works around the issue. Bug: 18510449 Bug: 20667396 Change-Id: Ia6e2a81cf5ecba972d155e56238ea946f8539411
Diffstat (limited to 'core/java.mk')
-rw-r--r--core/java.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java.mk b/core/java.mk
index ae4a602..b371289 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -441,9 +441,10 @@ proguard_dictionary := $(intermediates.COMMON)/proguard_dictionary
my_support_library_sdk_raise :=
ifneq (,$(filter android-support-%,$(LOCAL_STATIC_JAVA_LIBRARIES)))
ifdef LOCAL_SDK_VERSION
-ifeq (,$(filter current system_current, $(LOCAL_SDK_VERSION)))
ifdef TARGET_BUILD_APPS
+ifeq (,$(filter current system_current, $(LOCAL_SDK_VERSION)))
my_support_library_sdk_raise := $(call java-lib-files, sdk_vcurrent)
+endif
else
# For platform build, we can't just raise to the "current" SDK,
# that would break apps that use APIs removed from the current SDK.
@@ -451,7 +452,6 @@ else
endif
endif
endif
-endif
# jack already has the libraries in its classpath and doesn't support jars
legacy_proguard_flags := $(addprefix -libraryjars ,$(my_support_library_sdk_raise) $(full_shared_java_libs))