We use ANT to create jar files. In order to create 100% reliable builds (no matter on what machine they are generated), we want the files in the generated jar files to be sorted (so the used obfuscator produces the same result on each machine). The jar files (which then are sent to the obfuscator) are created using following code snippet:
<jar jarfile="my.jar" compress="false" duplicate="fail">
<fileset dir="classes" includes="com/**"/>
<!-- another fix -->
<fileset dir="classes" includes="org/**"/>
</jar>
How can we ensure that the files in the jar file are sorted? Thanks in advance.
OK, I’ve found a solution: