Sign in Go Pro

Gradle Dependency Management: Using Gradle Extra Properties (ext)




This is Google’s recommended way of doing this as seen <a href="" target="_blank">in the Android documentation</a>. It is also used in lots of Android projects, like ButterKnife and Picasso. This method is great for upgrading libraries like the support library. Every support library dependency has the same version number, so only having to change this in one place is 💯. The same things goes for Retrofit, and many other libraries. Related: [AutoComplete in your Gradle files with Kotlin](/lessons/gradle-dependency-management-using-kotlin-and-buildsrc-for-buildgradle-autocomplete-in-android-studio)