cmsdk: include our own consumer proguard rules

Include a proguard file with can be consumed by the latest gradle plugin to
merge this ones rules without the rules of the app linked to.
This way devs doesn't need to declare (in a recent version of the gradle plugin)
-dontwarn and -dontnote for cyanogenmod.library when linked to it, because
proguard crashes the build because it cannot access to cm system private classes.

Change-Id: I7c94a9119db744b0029b4d9a8aa782adcbd47b93
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
This commit is contained in:
Jorge Ruesga 2016-04-29 14:27:41 +02:00 committed by Gerrit Code Review
parent de43b8c2d8
commit c6550fd803
2 changed files with 4 additions and 0 deletions

View File

@ -143,6 +143,7 @@ LOCAL_JACK_ENABLED := disabled
# just need to define this, $(TOP)/dummy should not exist # just need to define this, $(TOP)/dummy should not exist
LOCAL_SRC_FILES := $(call all-java-files-under, dummy) LOCAL_SRC_FILES := $(call all-java-files-under, dummy)
LOCAL_CONSUMER_PROGUARD_FILE := $(LOCAL_PATH)/sdk/proguard.txt
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, sdk/res/res) LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, sdk/res/res)
LOCAL_MANIFEST_FILE := sdk/AndroidManifest.xml LOCAL_MANIFEST_FILE := sdk/AndroidManifest.xml

3
sdk/proguard.txt Normal file
View File

@ -0,0 +1,3 @@
# Ignore CyanogenMod SDK access to private resources
-dontwarn cyanogenmod.**
-dontnote cyanogenmod.**