Below is my gradle example: I want to change STORE_FILE_PATH value dynamically based on selected productFlavors. Currently STORE_FILE_PATH is always overwriting it\'s value
You should define multiple signingConfigs and use it in different productFlavors
signingConfigs{
freeKey{}
proKey{}
}
productFlavors {
free {
versionCode 1
versionName "1.0.0"
applicationId "com.example.free"
buildConfigField "boolean", "IS_AD_ENABLED", "true"
signingConfig signingConfigs.freeKey
}
pro {
versionCode 1
versionName "1.0.0 pro"
applicationId "com.example.pro"
buildConfigField "boolean", "IS_AD_ENABLED", "false"
signingConfig signingConfigs.proKey
}
}