Compute the RuleKey with and without deps simultaneously.

Summary:
It turns out that a `Hasher` created via `Hashing.sha1()` can have
its `hash()` method invoked only once. Therefore, to compute both
RuleKeys simultaneously, this diff introduces an AppendingHasher
that makes it possible to build up the SHA1 digest for a RuleKey
without deps, get its hash, and then update the digest with the deps
info, and get its hash again.

Test Plan:
Created a comprehensive unit test, AppendingHasherTest.
The updates to AbstractCachingBuildRuleTest.java reflect the
changes to RuleKey.
11 files changed
tree: 5fcd7e537134e4902cd23953d191cad875fc0951
  1. .idea/
  2. bin/
  3. config/
  4. docs/
  5. lib/
  6. plugin/
  7. pmd/
  8. scripts/
  9. src/
  10. test/
  11. testdata/
  12. third-party/
  13. .buckconfig
  14. .classpath
  15. .gitignore
  16. .project
  17. buck.iml
  18. build.xml
  19. DEFS
  20. LICENSE
  21. README.md
README.md

Buck

Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.

Installation

To build Buck, run the following:

git clone git@github.com:facebook/buck.git
cd buck
ant
./bin/buck --help

License

Apache License 2.0