Use LOCAL_ADDITIONAL_DEPENDENCIES instead of build system internals

Instead of directly adding dependencies to full_classes_compiled_jar
and full_classes_jack, just use LOCAL_ADDITIONAL_DEPENDENCIES and
let the build system take care of where the dependencies are needed.

Test: builds
Change-Id: Ie65d0761e61c719de92eb0953d2010c0c09fad1b
diff --git a/Android.mk b/Android.mk
index c348fdc..79df821 100644
--- a/Android.mk
+++ b/Android.mk
@@ -121,11 +121,9 @@
 LOCAL_MODULE := org.apache.http.legacy
 LOCAL_SOURCE_FILES_ALL_GENERATED := true
 LOCAL_SDK_VERSION := 21
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
 # Make sure to run droiddoc first to generate the stub source files.
-$(full_classes_compiled_jar) : $(apache_http_stubs_gen_stamp)
-$(full_classes_jack) : $(apache_http_stubs_gen_stamp)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(apache_http_stubs_gen_stamp)
+include $(BUILD_STATIC_JAVA_LIBRARY)
 
 # Archive a copy of the classes.jar in SDK build.
 $(call dist-for-goals,sdk win_sdk,$(full_classes_jar):org.apache.http.legacy.jar)