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
This commit is contained in:
Colin Cross
2017-08-10 15:24:10 -07:00
parent 05ecd66557
commit 128800f2c8
8 changed files with 27 additions and 6 deletions

View File

@@ -71,6 +71,7 @@ $(full_classes_compiled_jar): \
$(proto_java_sources_file_stamp) \
$(annotation_processor_deps) \
$(NORMALIZE_PATH) \
$(JAR_ARGS) \
$(ZIPTIME) \
$(LOCAL_ADDITIONAL_DEPENDENCIES) \
| $(SOONG_JAVAC_WRAPPER)