Essential Gradle Plugins for Android Development
Google released Android Studio 1.0 in early December, which is now the recommended way to develop and build Android apps. Android Studio uses the awesome Gradle build system under the hood, which offers a more effective way to build Java apps, powered by a Groovy DSL.
One of the best things about Gradle is it’s extensibility. You can easily add plugins to your build scripts to help with various common tasks. Here are a few essential plugins which should help speed up your Android app development process!
Android SDK Manager Plugin
Is your Android SDK missing? Is the API level not downloaded? Or maybe your support library’s out-of-date?
These are all typical problems that you shouldn’t have to deal with. They’re especially painful when you have multiple developers on a project or you’re using continuous integration tools, like Travis CI or Jenkins that must be kept up-to-date.
We use this Gradle plugin in the Bugsnag for Android build process to make sure all collaborators have an up-to-date Android SDK.
Gradle Git Plugin
Do you use Git or GitHub to store and collaborate around code? How do you manage and tag your app’s version numbers? It’s often useful to interact with Git when developing and releasing Android apps, and it’s now possible to do this using Gradle plugins!
The gradle-git plugin offers a set of plugins supporting interaction with Git within Gradle including managing your release process, general Git actions, and even publishing to a Github Pages website.
You can even manage your versioning scheme, for example using Semantic Versioning, tagging versions in Git as part of each release!
Gradle Play Publisher
So you’ve built your app and it’s ready for release, but now you have to go through the tedious process of uploading your APK to the Google Play Store.
At Google I/O 2014, Google announced a new API for uploading/publishing your Android APKs, which makes it much easier to get your apps live.
The Gradle Play Publisher plugin by Triple-T allows you to automatically upload your APK and app details to the Google Play Store as part of a build!
Gradle Maven Push
We use this Gradle plugin in the Bugsnag for Android build process.
Bugsnag Android Gradle Plugin
If you’re using ProGuard to minify or obfuscate your applications, this’ll mean your crash reports will also be obfuscated, making crashes harder to diagnose and fix.
The Bugsnag Android Gradle Plugin automatically uploads your ProGuard mapping files as part of each build, meaning crash reports are automatically de-obfuscated on your Bugsnag dashboard!
We’re clearly biased on this one :)
Did we miss any awesome Gradle plugins? What does the build process look like for your Android apps? Let us know on Twitter!
You should check out Bugsnag’s automatic Android crash reporting.
🚀 Bugsnag is hiring! · https://www.bugsnag.com/jobs/