Add a check for apex/allowed_deps.txt to droidcore.
The check ensures that build graph for updatable modules contains only
allowed dependencies at build time.
Bug: 149622332
Test: m
Change-Id: I52a4be72efaa523d53827dd11822a7802543dd10
(cherry picked from commit c72ee9cd023b76db6a365e0ff2e46fa791e64cc2)
diff --git a/core/main.mk b/core/main.mk
index 288a0f2..219ef5f 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1787,6 +1787,11 @@
ndk: $(SOONG_OUT_DIR)/ndk.timestamp
.PHONY: ndk
+# Checks that build/soong/apex/allowed_deps.txt remains up to date
+ifneq ($(UNSAFE_DISABLE_APEX_ALLOWED_DEPS_CHECK),true)
+ droidcore: ${APEX_ALLOWED_DEPS_CHECK}
+endif
+
$(call dist-write-file,$(KATI_PACKAGE_MK_DIR)/dist.mk)
$(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] writing build rules ...)