Merge "Add LOCAL_DONT_MERGE_MANIFESTS"

This commit is contained in:
Colin Cross 2018-06-15 18:23:44 +00:00 committed by Gerrit Code Review
commit 5d80834b32
2 changed files with 19 additions and 11 deletions

View file

@ -11,19 +11,26 @@ else
full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE) full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
endif endif
my_full_libs_manifest_files := $(LOCAL_FULL_LIBS_MANIFEST_FILES)
LOCAL_STATIC_JAVA_AAR_LIBRARIES := $(strip $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)) LOCAL_STATIC_JAVA_AAR_LIBRARIES := $(strip $(LOCAL_STATIC_JAVA_AAR_LIBRARIES))
ifdef LOCAL_STATIC_JAVA_AAR_LIBRARIES
my_full_libs_manifest_files += $(foreach lib, $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/aar/AndroidManifest.xml)
# With aapt2, we'll link in the built resource from the AAR. my_full_libs_manifest_files :=
ifneq ($(LOCAL_USE_AAPT2),true)
LOCAL_RESOURCE_DIR += $(foreach lib, $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),\ ifndef LOCAL_DONT_MERGE_MANIFESTS
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/aar/res) my_full_libs_manifest_files += $(LOCAL_FULL_LIBS_MANIFEST_FILES)
endif # LOCAL_USE_AAPT2
endif # LOCAL_STATIC_JAVA_AAR_LIBRARIES ifdef LOCAL_STATIC_JAVA_AAR_LIBRARIES
my_full_libs_manifest_files += $(foreach lib, $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/aar/AndroidManifest.xml)
endif
endif
ifdef LOCAL_STATIC_JAVA_AAR_LIBRARIES
# With aapt2, we'll link in the built resource from the AAR.
ifneq ($(LOCAL_USE_AAPT2),true)
LOCAL_RESOURCE_DIR += $(foreach lib, $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/aar/res)
endif
endif
# Set up rules to merge library manifest files # Set up rules to merge library manifest files
ifneq (,$(strip $(my_full_libs_manifest_files))) ifneq (,$(strip $(my_full_libs_manifest_files)))

View file

@ -61,6 +61,7 @@ LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES:=
LOCAL_DONT_CHECK_MODULE:= LOCAL_DONT_CHECK_MODULE:=
# Don't delete the META_INF dir when merging static Java libraries. # Don't delete the META_INF dir when merging static Java libraries.
LOCAL_DONT_DELETE_JAR_META_INF:= LOCAL_DONT_DELETE_JAR_META_INF:=
LOCAL_DONT_MERGE_MANIFESTS:=
LOCAL_DPI_FILE_STEM:= LOCAL_DPI_FILE_STEM:=
LOCAL_DPI_VARIANTS:= LOCAL_DPI_VARIANTS:=
LOCAL_DROIDDOC_ASSET_DIR:= LOCAL_DROIDDOC_ASSET_DIR:=