Sort files in directories passed to jar
jar -C <dir> . produces a jar containing files in filesystem order,
which can vary between builds. Manually find and sort the list of
files, and convert them into a list of -C <dir> <file> pairs.
Fixes: 64634025
Test: m -j checkbuild
Test: m -j out/target/product/sailfish/system/framework/ext.jar, check
that entries are sorted
Test: m -j out/target/product/generic_arm64/system/framework/ext.jar on mac
Change-Id: I7dced6acbe621a60cd49daf17872941485602732
diff --git a/core/host_java_library.mk b/core/host_java_library.mk
index a68be6a..033297a 100644
--- a/core/host_java_library.mk
+++ b/core/host_java_library.mk
@@ -71,6 +71,7 @@
$(proto_java_sources_file_stamp) \
$(annotation_processor_deps) \
$(NORMALIZE_PATH) \
+ $(JAR_ARGS) \
$(ZIPTIME) \
$(LOCAL_ADDITIONAL_DEPENDENCIES) \
| $(SOONG_JAVAC_WRAPPER)