Initial import.
Fix documentation: should be `git clone` instead of `git checkout`.
Add a favicon to the Buck docs.

Summary: The docs needed a favicon. Now it has one. :)

Test Plan: Loaded the docs, noted that the favicon is being rendered.
Set no_dx to take in a list of build rules as opposed to classpaths.

Test Plan: Unit Tests dawg
Remove '6' input from DefaultJavaLibraryRule.

Summary:
Fix DefaultLibraryRule to not consider sourceLevel and targetLevel as
inputs.  Unless a file named '6' happened to exist, this caused buck to
treat many build results as non-idempotent, resulting in significant
incremental build performance degradation.

Test Plan:
Verify that the following reports a build time under one minute:
  buck clean && buck build fb4a && time buck build fb4a
Fix SplitZip when no secondary dexs are created.

Summary:
When D773417 moved us to Guava, it changed ZipWithMaxDeflate to close instead of closeQuietly.  Native M Site and Appcenter both request to be splitzipped, even though they don't really need it for all builds.
This resulted in SplitZip producing no secondary dexes, which we then tried to zip with ZipWithMaxDeflate, which crashed when we tried to produce an emtpy zip.

Sorry for the reviewspam, we need to fix this.

Test Plan:
Unit test, built nativemsite locally.

testinprod
Update no_dx docs

Test Plan: My Eyes
Miscellaneous documentation fixes.

Summary:
@boval reported that the Quick Start instructions left IntelliJ
in a state where it associated a package named "java.com.example.activity"
with the android_library code rather than "com.example.activity."
This was because the Quick Start instructions failed to reference
the necessary update to .buckconfig.

Also fixed some spacing issues.

Test Plan: Inspect locally at http://localhost:9811/.
Fix an annoying typo in the overview docs.

Test Plan: visual inspection
Print out a custom error if using JRE without JDK.

Summary: I hate Java 7 so much.

Test Plan:
I think I used one of those scripts to install Java 7 on Ubuntu and I
ended up with the JRE but not the JDK and now life is bad.
Make `buck clean` synchronous.

Summary:
Had to refactor Process execution logic to safely take advantage of
Process.waitFor().

Test Plan: Sandcastle builds.
Change a RuntimeException to a HumanReadableException.

Test Plan: Violate visibility and verify how error is printed.
Remove unused warnings.

Test Plan: No yellow icon in Eclipse.
Change sample SDK location to a more likely default.

Test Plan: http://localhost:9811/setup/quickstart.html
Make buck-out directory configurable in the environment

Summary: I can set this in the environment to enable out-of-source builds.

Test Plan: Did an out-of-source build.
Fix a stale comment

Summary: BIN_DIRECTORY_NAME doesn't exist anymore.

Test Plan: grep
Reset output key after executing a caching rule

Summary:
Not sure if this always happens, but I got into a state where a genrule
kept re-executing because

- It would compute the output key by sha1'ing the file, and caching the
  the result in memory.
- It would see that the sha1 didn't match the output key in the .success
  file, so it would re-run the rule.
- The rule was outputting a zip file, which means that it is
  nondeterministic because zip files include timestamps.
- Finally, it would recreate the .success file, using the cached (and
  therefore wrong) output key.
- The next build would do the same thing.

My hacky fix for this is to drop the key after running the commands that
execute the rule, but I have no idea if the policy of perma-caching sha1
values is causing other bugs in the tree.

As a side note, the practice of using raw sha1 values as cache keys
seems like a huge problem for distributed caching when we have
nondeterministic build steps (like building JARs).

Test Plan: Built.  Saw that the infini-rebuild loop stopped.
Include .png files when uploading documentation.

Test Plan:
Ran ./docs/publish.sh and ensured the file ended up in the
correct place.
Fix Buck so it returns a useful error message when attempting to build or test a rule in a valid BUCK file with an invalid rule name.

Test Plan:
unit tests,
ran buck test --num-threads 12 //javatests/com/facebook/reflex:reflex in fb4a and verified it had a useful error message
Build up the diagnostic message by hand because Java6 is rubbish.

Summary: It seems as if Java 7 introduced a sane toString for a Diagnostic. This provides a rough implementation for Java 6 users.

Test Plan:
buck test --all
Introduced compilation error, visually inspected output.