Implement android_app_set module.
Bug: 152319766 Test: manual and builtin Change-Id: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428 Merged-In: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428
This commit is contained in:
parent
3ed9021f87
commit
eefa8e954e
2 changed files with 33 additions and 0 deletions
|
@ -21,6 +21,7 @@ LOCAL_ANNOTATION_PROCESSOR_CLASSES:=
|
|||
LOCAL_APIDIFF_NEWAPI:=
|
||||
LOCAL_APIDIFF_OLDAPI:=
|
||||
LOCAL_APK_LIBRARIES:=
|
||||
LOCAL_APK_SET_MASTER_FILE:=
|
||||
LOCAL_ARM_MODE:=
|
||||
LOCAL_ASFLAGS:=
|
||||
LOCAL_ASSET_DIR:=
|
||||
|
|
32
core/soong_android_app_set.mk
Normal file
32
core/soong_android_app_set.mk
Normal file
|
@ -0,0 +1,32 @@
|
|||
# App prebuilt coming from Soong.
|
||||
# Extra inputs:
|
||||
# LOCAL_APK_SET_MASTER_FILE
|
||||
|
||||
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
|
||||
$(call pretty-error,soong_apk_set.mk may only be used from Soong)
|
||||
endif
|
||||
|
||||
LOCAL_BUILT_MODULE_STEM := $(LOCAL_APK_SET_MASTER_FILE)
|
||||
LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_APK_SET_MASTER_FILE)
|
||||
|
||||
#######################################
|
||||
include $(BUILD_SYSTEM)/base_rules.mk
|
||||
#######################################
|
||||
|
||||
## Extract master APK from APK set into given directory
|
||||
# $(1) APK set
|
||||
# $(2) master APK entry (e.g., splits/base-master.apk
|
||||
|
||||
define extract-master-from-apk-set
|
||||
$(LOCAL_BUILT_MODULE): $(1)
|
||||
@echo "Extracting $$@"
|
||||
unzip -pq $$< $(2) >$$@
|
||||
endef
|
||||
|
||||
$(eval $(call extract-master-from-apk-set,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_APK_SET_MASTER_FILE)))
|
||||
LOCAL_POST_INSTALL_CMD := unzip -qo -j -d $(dir $(LOCAL_INSTALLED_MODULE)) \
|
||||
$(LOCAL_PREBUILT_MODULE_FILE) -x $(LOCAL_APK_SET_MASTER_FILE)
|
||||
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD)
|
||||
PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
|
||||
|
||||
SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
|
Loading…
Reference in a new issue