Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d608e99 authored by Adnan Begovic's avatar Adnan Begovic Committed by Rashed Abdel-Tawab
Browse files

build: Make sure we're building our secondary resource package as dependency.

  This allows us to reference internal or public resources without
  going explicitily through the platform sdk.

Change-Id: Iba361a3dcd20bc62a06e600e0240fb09d4e7bda4
parent dca46a9a
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -488,11 +488,24 @@ framework_res_package_export_deps := $(framework_res_package_export)
else # LOCAL_SDK_RES_VERSION
framework_res_package_export := \
    $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk

# Avoid possible circular dependency with our platform-res
ifneq ($(LOCAL_IGNORE_SUBDIR), true)
lineage_plat_res_package_export := \
    $(call intermediates-dir-for,APPS,org.lineageos.platform-res,,COMMON)/package-export.apk
endif # LOCAL_IGNORE_SUBDIR

# We can't depend directly on the export.apk file; it won't get its
# PRIVATE_ vars set up correctly if we do.  Instead, depend on the
# corresponding R.stamp file, which lists the export.apk as a dependency.
framework_res_package_export_deps := \
    $(dir $(framework_res_package_export))src/R.stamp

ifneq ($(LOCAL_IGNORE_SUBDIR), true)
lineage_plat_res_package_export_deps := \
    $(dir $(lineage_plat_res_package_export))src/R.stamp
endif # LOCAL_IGNORE_SUBDIR

endif # LOCAL_SDK_RES_VERSION
all_library_res_package_exports := \
    $(framework_res_package_export) \
@@ -503,6 +516,14 @@ all_library_res_package_export_deps := \
    $(framework_res_package_export_deps) \
    $(foreach lib,$(LOCAL_RES_LIBRARIES),\
        $(call intermediates-dir-for,APPS,$(lib),,COMMON)/src/R.stamp)

ifneq ($(LOCAL_IGNORE_SUBDIR), true)
all_library_res_package_exports += \
    $(lineage_plat_res_package_export)
all_library_res_package_export_deps += \
    $(lineage_plat_res_package_export_deps)
endif # LOCAL_IGNORE_SUBDIR

$(resource_export_package) $(R_file_stamp) $(LOCAL_BUILT_MODULE): $(all_library_res_package_export_deps)
$(LOCAL_INTERMEDIATE_TARGETS): \
    PRIVATE_AAPT_INCLUDES := $(all_library_res_package_exports)