1

Here my code snippet

val applicationId = when {
    this.name.contains("test") -> this.mergedFlavor.applicationId + ".test"
    this.name.contains("paidDebug") -> this.mergedFlavor.applicationId + ".dbg"
    this.name.contains("freeDebud") -> this.mergedFlavor.applicationId + ".dbg"
    this.name.contains("paidRelease") -> this.mergedFlavor.applicationId+ ".release"
    this.name.contains("freeRelease") -> this.mergedFlavor.applicationId+ ".release"
    else -> this.mergedFlavor.applicationId + ".development"
}
println(applicationId)
defaultConfig.applicationId = applicationId
println(this.applicationId)

But changing it to defaultConfig is not changing the applicationId.

j Ganesh
  • 11
  • 1
  • 1
    Why you can't use `applicationIdSuffix` of flavors? Read here: https://developer.android.com/studio/build/application-id#change_the_application_id_for_build_variants – MatPag Aug 12 '20 at 07:14
  • I have 34 different flavor in my app and 3 build types. Here in this 34*3 combination we have different applicationId. So, needs to change in this way – j Ganesh Aug 18 '20 at 07:29

0 Answers0