A better way to change Bundle Id / Package Name in Android than to Refactor
Just set a new applicationId
in your build.gradle
file. If you are using productFlavors
, set different applicationId
in your flavors, like:
productFlavors {
one {
applicationId "com.example.project.one"
}
two {
applicationId "com.example.project.two"
}
three {
applicationId "com.example.project.three"
}
}
Option a) Use gradle build flavors. You can specify a separate applicationId for each build flavor. The only problem is that the list of flavors on your project will grow with each added white label customer.
Option b) Turn your app project in a android library (aar). Create new projects for each white label app and import the library as a dependency. You will need a project template since some configuration will be necessary to use the aar as a replacement for the whole app.