From 1a2e9dc10c71e70648cf82254fe75e45ea7e6153 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 14 Jan 2019 12:49:24 -0800 Subject: [PATCH] Error if a Soong module attempts to install a classes jar Only dex jars should be installed, make it an error to not provide a dex jar for an device installable java module. Bug: 122831369 Test: m checkbuild Change-Id: I99c5738e6053fbaa3dd22406f50b7a002555702c --- core/soong_java_prebuilt.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk index a62590d84a..cfda44e0ec 100644 --- a/core/soong_java_prebuilt.mk +++ b/core/soong_java_prebuilt.mk @@ -121,6 +121,11 @@ ifdef LOCAL_SOONG_DEX_JAR java-dex : $(common_javalib.jar) endif # LOCAL_UNINSTALLABLE_MODULE else # LOCAL_SOONG_DEX_JAR + ifndef LOCAL_UNINSTALLABLE_MODULE + ifndef LOCAL_IS_HOST_MODULE + $(call pretty-error,Installable device module must have LOCAL_SOONG_DEX_JAR set) + endif + endif $(eval $(call copy-one-file,$(full_classes_jar),$(LOCAL_BUILT_MODULE))) endif # LOCAL_SOONG_DEX_JAR