To make Android Studio configuration simply, I move all declaration of version name, version code, change logs into versions.gradle . For example

ext { def versionMajor = 0 def versionMinor = 9 def versionPatch = 5 def buildNumber = 95 def buildName = "${versionMajor}.${versionMinor}.${versionPatch}" appVersion = [ versionCode: buildNumber, versionName: buildName ] }

Then, in build.gradle of project level, include it:

apply from: "versions.gradle"

But, if I edit versions.gradle (change version number), the whole project doesn't automatically sync or even show a warning message ask to sync. I must manually sync Gradle. Moreover, if my co-worker pulls versions.gradle to his repo, Gradle sync doesn't run in his side. Or, he must know there is Gradle changes, then manually sync.

It seems Android Studio only automatically sync if build.gradle and settings.gradle are changed. Is there any way to force Gradle sync if any change was made in *.gradle ?

I'm using Android Studio 1.5 with Gradle 2.8.