How to centralize the support libraries dependencies in gradle
Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries. A very good way is to separate gradle build files, defining something like: root --gradleScript ----dependencies.gradle --module1 ----build.gradle --build.gradle In gradleScript/dependecies.gradle : ext { //Version supportLibrary = '22.2.1' //Support Libraries dependencies supportDependencies = [ design : "com.android.support:design:${supportLibrary}", recyclerView : "com.android.support:recyclerview-v7:${supportLibrary}", cardView : "com.android.support:cardview-v7:${supportLibrary}", appCompat : "com.android.support:appcompat-v7:${supportLibrary}", supportAnnotation: "com.android.support:support-annotations:${supportLibrary}", ] } In the top level file build.gradle