Merge "Copy generated $(SOONG_OUT_DIR)/module_bp_java_deps.json file to dist when SOONG_COLLECT_JAVA_DEPS flag is set." am: 97a498b177

Original change: https://android-review.googlesource.com/c/platform/build/+/1439143

Change-Id: I331b855ffa98aa34c539f8688ba7590fba9c8998
diff --git a/core/main.mk b/core/main.mk
index ebec885..8c29045 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1639,6 +1639,10 @@
 # dist_files only for putting your library into the dist directory with a full build.
 .PHONY: dist_files
 
+ifeq ($(SOONG_COLLECT_JAVA_DEPS), true)
+  $(call dist-for-goals, dist_files, $(SOONG_OUT_DIR)/module_bp_java_deps.json)
+endif
+
 .PHONY: apps_only
 ifneq ($(TARGET_BUILD_APPS),)
   # If this build is just for apps, only build apps and not the full system by default.