Defining product flavors
suggest changeProduct flavors are defined in the build.gradle file inside the android { ... } block as seen below.
...
android {
...
productFlavors {
free {
applicationId "com.example.app.free"
versionName "1.0-free"
}
paid {
applicationId "com.example.app.paid"
versionName "1.0-paid"
}
}
}
This defines two product flavors, free and paid. Each can have its own configuration. Here each flavor sets its own applicationId and versionName. The main source set is not a flavor. It is shared by every variant.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents