I need to create different application names depending on the taste of the product used.
Although it was easy, just setting the string resource, I can no longer do this, because when the application is loaded into hockeyapp, the application name is set to "@ string / app_name" instead of the value of app_name.
I made some progress by setting the label in the manifest as '$ {applicationName}' and setting the value with
manifestPlaceholders = [ applicationName : appName ];
in the taste block of the product, so that the value will be set at compile time.
The problem occurs when I try to add an assembly type to the application name. I cannot find a way to find out what type of assembly is currently used in the product.
This is a stripped down version of the assembly for readability.
android {
buildVersionName "1.0.0
buildTypes {
release {
... nothing special
}
uat {
signingConfig signingConfigs.debug
buildType = "uat"
applicationIdSuffix = "." + buildType
}
debug {
signingConfig signingConfigs.debug
buildType = "uat"
applicationIdSuffix = "." + buildType
}
}
productFlavors{
flavor1{
def appName = "app name " + buildType;
manifestPlaceholders = [ applicationName : appName ];
applicationId [id]
def clientIteration = [client iteration]
versionName buildVersionName + clientIteration
versionCode [version code]
}
flavor2{
... same as above with different app name
}
flavor3{
... same as above with different app name
}
}
}
, , 'buildType' buildtype ( debug), , .
, , - .