update gradle files to work with latest Android gradle plugin

The Android Gradle plugin has changed a bit since the last commit to this project, so I've updated the various build scripts to use the newest version (since current Android Studio requires it).