Support LOCAL_STATIC_JAVA_AAR_LIBRARIES with aapt2

LOCAL_STATIC_JAVA_AAR_LIBRARIES are slightly different from
LOCAL_STATIC_ANDROID_LIBRARIES, due to b/78447299 the
AndroidManifest.xml from ANDROID libraries are ignored.
Temporarily add support for LOCAL_STATIC_JAVA_AAR_LIBRARIES
when using LOCAL_USE_AAPT2 := true, treating them the same
as LOCAL_STATIC_ANDROID_LIBRARIES except that they are
merged by android_manifest.xml

Bug: 78447299
Bug: 79481102
Test: m FORCE_AAPT2=true checkbuild
Change-Id: Ia6210810c1ea6e776be97ae1c9a586b5de844125
This commit is contained in:
Colin Cross
2018-05-23 13:35:53 -07:00
parent 3b801ca7fb
commit 71c5b95aa6
4 changed files with 7 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ need_compile_res := true
LOCAL_RESOURCE_DIR := $(foreach d,$(LOCAL_RESOURCE_DIR),$(call clean-path,$(d)))
endif
ifeq ($(LOCAL_USE_AAPT2),true)
ifneq ($(LOCAL_STATIC_ANDROID_LIBRARIES),)
ifneq ($(strip $(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)),)
need_compile_res := true
endif
endif
@@ -120,7 +120,7 @@ endif
endif
ifeq ($(LOCAL_USE_AAPT2),true)
import_proguard_flag_files := $(strip $(foreach l,$(LOCAL_STATIC_ANDROID_LIBRARIES),\
import_proguard_flag_files := $(strip $(foreach l,$(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/export_proguard_flags))
$(intermediates.COMMON)/export_proguard_flags: $(import_proguard_flag_files) $(addprefix $(LOCAL_PATH)/,$(LOCAL_EXPORT_PROGUARD_FLAG_FILES))
@echo "Export proguard flags: $@"