Fix PDK builds
$OUT/obj/APPS/SystemUI_intermediates/package.dex.apk was not being
written after being converted to Soong. Add a copy rule for it
to soong_app_prebuilt.mk, add it as an implicit output to the Make
rules that create it, and add it as a real dependency to the
platform.zip rules.
Test: m platform
Change-Id: I96f58d3d80b764a51a6acb87e92498589cfe5c18
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index 68916c0..d02cba6 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -62,6 +62,10 @@
# defines built_odex along with rule to install odex
include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk
+ifneq ($(BUILD_PLATFORM_ZIP),)
+ $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(dir $(LOCAL_BUILT_MODULE))package.dex.apk))
+endif
+
ifdef LOCAL_DEX_PREOPT
$(built_odex): $(LOCAL_SOONG_DEX_JAR)
$(call dexpreopt-one-file,$<,$@)