Use soong_zip instead of jar to generate .jar files in javac actions

This is to make the jar-output deterministic so that we can get
cache-hits for r8/d8 actions from RBE.

Change-Id: I911ee702fa5dabfe7122e82b21f78c811a0c960d
Test: m droid checkbuild
diff --git a/core/definitions.mk b/core/definitions.mk
index b714bdb..b3e2a3b 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2093,7 +2093,7 @@
 $(if $(PRIVATE_JAR_EXCLUDE_PACKAGES), $(hide) rm -rf \
     $(foreach pkg, $(PRIVATE_JAR_EXCLUDE_PACKAGES), \
         $(PRIVATE_CLASS_INTERMEDIATES_DIR)/$(subst .,/,$(pkg))))
-$(hide) $(JAR) -cf $@ $(call jar-args-sorted-files-in-directory,$(PRIVATE_CLASS_INTERMEDIATES_DIR))
+$(hide) $(SOONG_ZIP) -jar -o $@ -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) -D $(PRIVATE_CLASS_INTERMEDIATES_DIR)
 $(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@))
 endef