From 1e1241ce3d4259bcc4a0039ed68fc5b3fc8069b5 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 12 Jun 2013 15:25:23 -0700 Subject: [PATCH] Dist static Java library modules. With this change, we can build and dist static jar files, as well as apks. Bug: 9386024 Change-Id: Iab4660d8dfd7a2d164714a2124445de298075901 --- core/main.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/main.mk b/core/main.mk index e03801ce58..6a077e48fb 100644 --- a/core/main.mk +++ b/core/main.mk @@ -794,9 +794,14 @@ ifneq ($(TARGET_BUILD_APPS),) unbundled_build_modules := $(TARGET_BUILD_APPS) endif + # Dist the installed files if they exist. apps_only_installed_files := $(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED)) - # dist the unbundled app. $(call dist-for-goals,apps_only, $(apps_only_installed_files)) + # For uninstallable modules such as static Java library, we have to dist the built file, + # as . + apps_only_dist_built_files := $(foreach m,$(unbundled_build_modules),$(if $(ALL_MODULES.$(m).INSTALLED),,\ + $(ALL_MODULES.$(m).BUILT):$(m)$(suffix $(ALL_MODULES.$(m).BUILT)))) + $(call dist-for-goals,apps_only, $(apps_only_dist_built_files)) ifeq ($(EMMA_INSTRUMENT),true) $(EMMA_META_ZIP) : $(apps_only_installed_files)