Explicit dependency on hostdex classes.jar.

Previously for hostdex Java libraries, we set up dependency on only
javalib.jar, which in turn is dependent on classes.jar.
But when jack is enabled there is no dependency of javalib.jar on
classes.jar. In commit b4c49cba57d classes.jar was universally added to
all host java library dependencies. That's unnecessary.

This change adds explicit dependency on classes.jar only for hostdex
modules.

On the other hand, if we switch checked module to $(full_classes_jack),
like what we did in commit 8bc90fd2d6ccf, we won't need this to fix jack
build either, because classes.jar isn't needed when you run checkbuild.

Change-Id: I92c0e4d621d266f6e6914ab2b4f20e5531af070f
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 883f330..fee05dc 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -420,7 +420,8 @@
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
 
 full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
-full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
+full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) \
+    $(full_shared_java_libs)
 else
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH :=
 
diff --git a/core/definitions.mk b/core/definitions.mk
index 587aab2..cddbe25 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -600,7 +600,7 @@
 # $(1): library name
 # $(2): Non-empty if IS_HOST_MODULE
 define _java-lib-full-dep
-$(call _java-lib-dir,$(1),$(2))/$(if $(2),javalib,classes)$(COMMON_JAVA_PACKAGE_SUFFIX) $(call _java-lib-full-classes.jar,$(lib),$(2))
+$(call _java-lib-dir,$(1),$(2))/$(if $(2),javalib,classes)$(COMMON_JAVA_PACKAGE_SUFFIX)
 endef
 
 # $(1): library name list