Mobile Zone is brought to you in partnership with:

Alec is a Content Curator at DZone and lives in Raleigh, North Carolina. He is interested in Java and Android programming, and databases of all types. When he's not writing for the NoSQL and IoT Zones, you might find him playing bass guitar, writing short stories where nothing happens, or making stuff in Java. Alec is a DZone Zone Leader and has posted 579 posts at DZone. You can read more from them at their website. View Full User Profile

How to Use Groovy to Build Android Apps

06.16.2014
| 10542 views |
  • submit to reddit

One of the key ideas of Groovy is to help Java developers be more productive, so why not bring it to Android? Luckily, Cédric Champeau has done exactly that with this Gradle plug-in on available on GitHub.

It looks pretty straight-forward: edit your build.gradle a bit, choose your Groovy version and modules, add a depedency, and that's about it. It does seem to be leaning toward Android Studio, but that's okay, people seem to like Android Studio

For more information, though, Champeau also has a blog post on the topic. He covers his reasons for creating the project, as well as a few more specific usage tips. He has big plans for Groovy on Android, though:

Some people are already asking for a {swift} alternative for Android. It’s there guys, you have it, so spread the word and let’s make it happen! I am convinced that it is the beginning of a new era for Android and Groovy. Google already switched their main build system to Gradle, which is, by the way, using Groovy, so I think it’s time to move over and show your love!

You can also check out an open-source sample app from Champeau - his first Android app, I believe - built entirely in Groovy. You know, if you just want proof that it's possible.

Take that, Swift.