commit | a4fa69137e085b5ec36729074671a0bd9556c436 | [log] [tgz] |
---|---|---|
author | Shawn Pearce <sop@google.com> | Wed Sep 25 13:24:06 2013 -0700 |
committer | Michael Bolin <mbolin@fb.com> | Wed Sep 25 16:46:30 2013 -0700 |
tree | d4aaf22ca7c4092867ffc4db6eccf2604b33f4d9 | |
parent | 7153ace0c1092100653e5ce42f00f81c5f7855bf [diff] |
Reset compressed size when combining JAR/ZIP archives. Summary: From https://github.com/facebook/buck/pull/16. zlib does not always deflate a resource to the same compressed size as the original input. The input resource may have been compressed using a different version of libz, or different compression settings. Before adding each entry to the ZIP, clone the entry and reinitialize the compressed field to -1 as is done by the more commonly used `ZipEntry(String)` constructor. This fixes a rare case where including a JAR in a `java_binary()` may throw an error such as: invalid entry compressed size (expected 4271 but got 4275 bytes) Test Plan: Sandcastle builds.
Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.
To build Buck, run the following:
git clone git@github.com:facebook/buck.git cd buck ant ./bin/buck --help
Apache License 2.0