Better Programming

Advice for programmers.

Follow publication

Member-only story

Gradle Dependency Management With BuildSrc and Kotlin DSL

Siva Ganesh Kantamani
Better Programming
Published in
5 min readOct 26, 2020

--

Takeaway From the Article

Mainly it focuses on building a Gradle dependency management system using the buildSrc directory and Kotlin DSL scripts. You’ll also learn the advantages of doing this over using conventional Groovy code.

If you prefer to watch this blog as a video, a YouTube video is embedded at the end of this article.

Problem

It’s a well-known fact that maintaining dependencies in a rapidly growing project is a tedious job. Traditional Groovy scripts, without code navigation, autocomplete, performance issues, and runtime errors, make it even worse.

Most importantly, the vast majority of android developers won’t have an idea of what they’re writing while they use Groovy. Even I didn’t know what was doing when using Groovy in the early stages of my career.

Thanks to the Gradle team and community working to provide a smooth and safe build process. One of the best solutions they've come up with is using the buildSrc directory with Kotlin DSL scripts.

Solution

--

--

Write a response