robolectric/robolectric — pull request #735 by mag (2013-10-04 18:52:13+00:00)
Title: Upgrade Robolectric to use Android 4.3_r2

### WARNING
**Do not merge me until 2.2 is released.** This is a potentially breaking change that needs time to bake and be tested across a variety of test suites. :bowtie:

### What we did
- Built a subset of Android 4.3_r2 as JAR files, and got Robolectric running green against it
- Documented and scripted the process to build and mavenize Android from AOSP source
- Changed pom.xml to statically compile Robolectric against real Android 4.3_r2 JARs. This allows us to debug in our IDE.
- Add concept of a "robolectric sub-version" to our Android real JARs version number. This is so we can iteratively release new version of the Android JARs (on the same Android version) if we don't build them correctly

### Notes
- Android 4.3_r2 will call `Activity.onCreateOptionsMenu()` automatically when your Activity becomes visible AND has an ActionBar. This may break some of your existing tests if you're calling onCreateOptionsMenu in your test (passing in a TestMenu), which is fairly typical Robolectric pattern. This isn't necessary anymore. Let the system call that method, and then you can get the real Menu using `ShadowActivity.getOptionsMenu()`. Make sure your Activity is calling through to super or this won't work!
- We had to post-process the android-ext jar in order to get a punch of locale data files in there as resources. This also required a change to `AsmInstrumentingClassloader` in order to allow the loading of those resource files.

Feedback appreciated!

:metal: