Export recovery partition related variables to Soong

Exported variables:
- TARGET_COPY_OUT_RECOVERY
- BUILDING_RECOVERY_IMAGE

This change also creates an installed file_list.txt file for the
recovery partition.

Test: m nothing
Bug: 381888358
Change-Id: I8743e5f7db25a7e514094613467a5ad66a2818f0
diff --git a/core/Makefile b/core/Makefile
index 35a8a89..f15edb2 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2936,6 +2936,9 @@
 $(error MTD device is no longer supported and thus BOARD_NAND_SPARE_SIZE is deprecated.)
 endif
 
+recovery_intermediates := $(call intermediates-dir-for,PACKAGING,recovery)
+$(eval $(call write-partition-file-list,$(recovery_intermediates)/file_list.txt,$(TARGET_RECOVERY_OUT),$(INTERNAL_RECOVERYIMAGE_FILES)))
+
 
 # -----------------------------------------------------------------
 # Build debug ramdisk and debug boot image.
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 0dd91cc..c170ea5 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -194,6 +194,8 @@
 $(call add_json_str,  SystemDlkmPath,                    $(TARGET_COPY_OUT_SYSTEM_DLKM))
 $(call add_json_str,  OemPath,                           $(TARGET_COPY_OUT_OEM))
 $(call add_json_bool, MinimizeJavaDebugInfo,             $(filter true,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)))
+$(call add_json_str,  RecoveryPath,                      $(TARGET_COPY_OUT_RECOVERY))
+$(call add_json_bool, BuildingRecoveryImage,             $(BUILDING_RECOVERY_IMAGE))
 
 $(call add_json_bool, UseGoma,                           $(filter-out false,$(USE_GOMA)))
 $(call add_json_bool, UseRBE,                            $(filter-out false,$(USE_RBE)))