Convert All your Gradle Dependencies into Functions — Android

No More Comments to dependencies

his article is based on what I Learned today, As we already know we need to add a dependency in an android Gradle file, & we all do to divide them with comments to identify which dependency is for which purpose.

hat if we can divide all our Gradle files into functions and call them in our dependencies section, instead of putting all your Gradle dependencies in one place and divide them with comments. Without wasting the time see the below screenshot how you gonna do this.

Android Studio Gradle file

That’s it now you can convert all your dependency into functions without dividing them into comments.

Sharing Knowledge is Caring 😊

Thanks for reading this article. Be sure to clap to recommend this article if you found it helpful. It means a lot to me.

If you need any help then Join me on Twitter, Linkedin, Github, and Subscribe to my Youtube Channel.

Senior Software Engineer(Android). Open Source Contributor, Technical Writer, Email: Dani.amjad12@gmail.com check my website at https://danishamjad.com/

The (retired) Pub(lication) for Android & Tech, focused on Development