ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Follow publication

Member-only story

Better dependency management in Android Studio 3.5 with Gradle buildSrcVersions

Jean-Michel Fayard
ProAndroidDev
Published in
5 min readAug 23, 2019

--

Personally, I’m most excited not by any new feature but by a bugfix which makes relevant again for android developers my open-source project for managing dependencies.

This project was born out of a growing disgust for this dark corner of Android Studio:

Android Studio support for editing the Gradle files was bad

Android Studio is in general a magnificent IDE, and integration with Gradle is an essential component of it. So you would expect to have great tooling support for editing your build files.

Instead, this error message is the exact moment where it all breaks down.

“Try Again” is kind of misnomer here. What is really meant is more something like: “You have some error, somewhere, and you are on your own to fix it. Good luck, and tell me when you think you are done.”.

The developer experience becomes more like something you would expect from the JavaScript world. You copy/paste some stuff from some website, hopefully at the right place. That itself is non-trivial! Hoping for the best, you launch the Sync and a cryptic error message is thrown. Rince and repeat.

Why is the tooling so bad? Pretty much the same reasons that in the javascript world: we are doing lots of meta-programming stuff (with Gradle plugins) using a dynamic language (Groovy).

Gradle has the right long-term plan to overcome this problem: write less Groovy and more Kotlin.

But while Kotlin is probably the future, Groovy is the present. And we need some incremental progress to help us here and now with our existing…

--

--

Published in ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.