re: I got 99 problems, and I wish builds weren't one of them. Android devs: what are your Gradle pain points? VIEW POST

  1. Don't rely on git to let you know if your workspace is "clean" There are gradle files you should have ignored by git but can change how your build works. Use git status --ignored liberally

  2. Duplicate compile work when using gradle CLI & Android Studio. It's like what even are caches

  3. Gradle & Groovy. Did make just set the standard that each new build system requires learning Yet Another Language

  4. Gradle & Java. Builds should be fast. Gradle is not (at least for non-trivial projects). Comparing Android+Android Studio and iOS+Xcode equivalent apps' (as in the same app for the same company with parity) build times is laughable. Xcode is like the time it takes for me to take a sip of my coffee. Android Studio is closer to making a Starbucks run.


Could you elaborate on the first point? I've never run into an issue like that, I think.

Regarding duplicate gradle work with CLI and AS, I totally agree. I blame AS for this, though. It does a lot of "magic" behind the scenes that a gradle command on CLI will not do.

On the Groovy point, I remember being confused when I first made the switch from Eclipse to Android Studio and Gradle. But ultimately I became really happy that I was able to write my build logic with a real language! At least Groovy is a JVM language, so the hurdle isn't as great as it could be. It also helped me a lot when I started writing my unit tests with the Spock framework, which uses Groovy. As annoying as it might be, I'd encourage you to spend the time -- you won't regret it! ALSO, I would be remiss if I didn't point out that we can now write our Gradle scripts in Kotlin, so if you've made that switch in your app dev work, you can now use just one language for both.

What kind of configuration do you do with your gradle scripts? I recently managed to shave ~20s off build times by enabling parallel builds (I had to do a bit of work to decouple my 18 gradle modules first, though).

code of conduct - report abuse