I have different productFlavors specified in my build.gradle file
dev {
applicationId "com.advancedprogressive.chare.dev"
versionCode 83
versionName "2.2.1"
}
staging {
applicationId "com.advancedprogressive.chare.qa"
versionCode 119
versionName "2.8.1"
}
and have have signing configurations like
signingConfigs {
release {
storeFile
storePassword
keyAlias
keyPassword }
debug {
keyPassword
storeFile
keyAlias
storePassword
}
}
I have different keystors for both flavors. I can specify different keystores for different build types e.g debug/release but how can i specify different keysotre for each flavor.
Using below gradle
you can achieve multiple productFlavors :
android {
signingConfigs {
release {
keyAlias 'alias'
keyPassword 'password'
storeFile file('first.keystore')
storePassword 'password'
}
debug {
keyAlias 'alias'
keyPassword 'password'
storeFile file('second.keystore')
storePassword 'password'
}
}
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
}
productFlavors{
dev {
applicationId "com.advancedprogressive.chare.dev"
versionCode 83
versionName "2.2.1"
signingConfig signingConfigs.debug
}
staging {
applicationId "com.advancedprogressive.chare.qa"
versionCode 119
versionName "2.8.1"
signingConfig signingConfigs.release
}
}
}
I hope its help you.
You can use somenthing like this:
android {
signingConfigs {
dev {
}
staging {
}
}
productFlavors {
dev {
signingConfig signingConfigs.dev
}
staging {
signingConfig signingConfigs.staging
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With