How to Use Groovy to Build Android Apps
Join the DZone community and get the full member experience.
Join For FreeOne 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.
Opinions expressed by DZone contributors are their own.
Comments