Finish migrating to Gradle, compat lib.
Bunch of fixes, now running in the emulator!