allprojects { repositories { google() mavenCentral() configurations.all { resolutionStrategy { force "com.google.android.gms:play-services-location:21.0.1" } } } } rootProject.buildDir = '../build' subprojects { afterEvaluate { project -> if (project.hasProperty('android')) { project.android { if (namespace == null) { namespace project.group } } } } } subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } tasks.register("clean", Delete) { delete rootProject.buildDir }