Remove implicit make rule, replace with explicit copies

We're deprecating implicit make rules, so switch this over to
copy-many-files (at least for the libraries that aren't already copied
in other makefiles).

Test: out/host/linux-x86/framework/tradefed.jar installs all three libs
Test: build-aosp_arm.ninja has trivial diffs (ordering, more quotes)
Change-Id: I09c7c36cad07019243c825977f689fa31a180518
diff --git a/Android.mk b/Android.mk
index ff97558..3afaf4f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -52,16 +52,14 @@
 
 # makefile rules to copy jars to HOST_OUT/tradefed
 # so tradefed.sh can automatically add to classpath
-DEST_JAR := $(HOST_OUT)/tradefed/$(LOCAL_MODULE).jar
-$(DEST_JAR): $(LOCAL_BUILT_MODULE)
-	$(copy-file-to-new-target)
+deps := $(call copy-many-files,\
+  $(LOCAL_BUILT_MODULE):$(HOST_OUT)/tradefed/$(LOCAL_MODULE).jar \
+  $(HOST_OUT_JAVA_LIBRARIES)/tools-common-prebuilt.jar:$(HOST_OUT)/tradefed/tools-common-prebuilt.jar)
 
-$(HOST_OUT)/tradefed/%.jar : $(HOST_OUT_JAVA_LIBRARIES)/%.jar
-	$(copy-file-to-new-target)
-
-# this dependency ensure the above rule will be executed if jar is built
-$(LOCAL_INSTALLED_MODULE) : $(DEST_JAR)
-$(LOCAL_INSTALLED_MODULE) : $(foreach m, $(LOCAL_JAVA_LIBRARIES), $(HOST_OUT)/tradefed/$(m).jar)
+# this dependency ensures the above rule will be executed if jar is installed
+$(LOCAL_INSTALLED_MODULE) : $(deps)
+# The copy rule for loganalysis is in tools/loganalysis/Android.mk
+$(LOCAL_INSTALLED_MODULE) : $(HOST_OUT)/tradefed/loganalysis.jar
 
 #######################################################
 # intentionally skipping CLEAR_VARS