Merge changes I9b67fd2a,I761f2d06
* changes: Revert "Revert "Use AAPT2 by default"" Work around incorrect R8 proguard compatibility
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
# Including this makefile will force AAPT2 on if FORCE_AAPT2==true,
|
# Including this makefile will force AAPT2 on if FORCE_AAPT2==true,
|
||||||
# rewriting some properties to convert standard AAPT usage to AAPT2.
|
# rewriting some properties to convert standard AAPT usage to AAPT2.
|
||||||
|
|
||||||
ifeq ($(FORCE_AAPT2),true)
|
ifneq ($(FORCE_AAPT2),false)
|
||||||
ifeq ($(LOCAL_USE_AAPT2),)
|
ifeq ($(LOCAL_USE_AAPT2),)
|
||||||
# Force AAPT2 on
|
# Force AAPT2 on
|
||||||
LOCAL_USE_AAPT2 := true
|
LOCAL_USE_AAPT2 := true
|
||||||
@@ -47,7 +47,6 @@ ifeq ($(FORCE_AAPT2),true)
|
|||||||
ifeq (,$(strip $(LOCAL_MANIFEST_FILE)$(LOCAL_FULL_MANIFEST_FILE)))
|
ifeq (,$(strip $(LOCAL_MANIFEST_FILE)$(LOCAL_FULL_MANIFEST_FILE)))
|
||||||
ifeq (,$(wildcard $(LOCAL_PATH)/AndroidManifest.xml))
|
ifeq (,$(wildcard $(LOCAL_PATH)/AndroidManifest.xml))
|
||||||
# work around missing manifests by creating a default one
|
# work around missing manifests by creating a default one
|
||||||
$(call pretty-warning, Missing manifest file)
|
|
||||||
LOCAL_FULL_MANIFEST_FILE := $(call local-intermediates-dir,COMMON)/DefaultManifest.xml
|
LOCAL_FULL_MANIFEST_FILE := $(call local-intermediates-dir,COMMON)/DefaultManifest.xml
|
||||||
ifdef LOCAL_MIN_SDK_VERSION
|
ifdef LOCAL_MIN_SDK_VERSION
|
||||||
my_manifest_min_sdk_version := $(LOCAL_MIN_SDK_VERSION)
|
my_manifest_min_sdk_version := $(LOCAL_MIN_SDK_VERSION)
|
||||||
|
@@ -458,6 +458,9 @@ endif
|
|||||||
ifeq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
|
ifeq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
|
||||||
# By default no obfuscation
|
# By default no obfuscation
|
||||||
common_proguard_flags += -dontobfuscate
|
common_proguard_flags += -dontobfuscate
|
||||||
|
# Workaround for b/80081393: R8 discards other attributes when
|
||||||
|
# -keepattributes *Annotations* is used, even when obfuscation is off.
|
||||||
|
common_proguard_flags += -keepattributes '*'
|
||||||
endif # No obfuscation
|
endif # No obfuscation
|
||||||
ifeq ($(filter optimization,$(LOCAL_PROGUARD_ENABLED)),)
|
ifeq ($(filter optimization,$(LOCAL_PROGUARD_ENABLED)),)
|
||||||
# By default no optimization
|
# By default no optimization
|
||||||
|
Reference in New Issue
Block a user