How to Use Groovy to Build Android Apps

DZone 's Guide to

How to Use Groovy to Build Android Apps

· Mobile Zone ·
Free Resource

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.

android, gradle, groovy, java, mobile, tool, tools & methods

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}