I understand this question is old, but for those who have the same problem, I finally found this configuration that works for us:
In the root directory of build.gradle :
ext { signingConfigs = { release { storeFile rootProject.file('keystores/release.keystore') storePassword 'pass' keyAlias 'alias' keyPassword 'pass' } // Optionally other configs like 'debug' here... } // Other ext properties here... }
Then, in separate build.gradle modules build.gradle files (except library modules):
android {
Thus, at least you do not need to duplicate the password / store name everywhere. It also makes it easier to switch to using environment variables for passwords, which are good practice.
source share