Compare Gradle-produced Zip archives to Apache Ant-produced Zip archives

(Matthew Accola) #1

I am migrating my build from Apache Ant to Gradle and I wanted to verify that the artifacts produced by the new Gradle build were the same as the old ones. I am using zipdiff,, to compare the archives. The problem I was having was that Ant sets the compression method on the directories inside the archive to “Store” and Gradle sets it to “Deflated”. This was causing zipdiff to flag every directory as changed.

I did a little research and found the place where Ant hard-codes the method. I posted a bug in the Apache Bug database along with a workaround, Just thought I would post this in case anyone had the same issue.