I need to install two different build types for Android, i.e. stagingand release.
defaultConfig {
applicationId "com.app.testing"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "SERVER_URL", '"http://testing.com"'
}
dev {
applicationIdSuffix ".dev"
buildConfigField "String", "SERVER_URL", '"http://testing.com"'
}
Now I want to add versionNamefor each type of assembly. How can i do this?
Edit
productFlavors{
release {
versionname = "1.0"
}
dev{
versionname = "1.0"
}
}
source
share