Rename Flavor -> NiaFlavor

pull/458/head
mlykotom 2 years ago
parent 867cc549cd
commit a1d7a90766

@ -13,19 +13,19 @@ enum class FlavorDimension {
// The content for the app can either come from local static data which is useful for demo // The content for the app can either come from local static data which is useful for demo
// purposes, or from a production backend server which supplies up-to-date, real content. // purposes, or from a production backend server which supplies up-to-date, real content.
// These two product flavors reflect this behaviour. // These two product flavors reflect this behaviour.
enum class Flavor(val dimension: FlavorDimension, val applicationIdSuffix: String? = null) { enum class NiAFlavor(val dimension: FlavorDimension, val applicationIdSuffix: String? = null) {
demo(FlavorDimension.contentType), DEMO(FlavorDimension.contentType),
prod(FlavorDimension.contentType, ".prod") PROD(FlavorDimension.contentType, ".prod")
} }
fun Project.configureFlavors( fun Project.configureFlavors(
commonExtension: CommonExtension<*, *, *, *>, commonExtension: CommonExtension<*, *, *, *>,
flavorConfigurationBlock: ProductFlavor.(flavor: Flavor) -> Unit = {} flavorConfigurationBlock: ProductFlavor.(flavor: NiAFlavor) -> Unit = {}
) { ) {
commonExtension.apply { commonExtension.apply {
flavorDimensions += FlavorDimension.contentType.name flavorDimensions += FlavorDimension.contentType.name
productFlavors { productFlavors {
Flavor.values().forEach { NiAFlavor.values().forEach {
create(it.name) { create(it.name) {
dimension = it.dimension.name dimension = it.dimension.name
flavorConfigurationBlock(this, it) flavorConfigurationBlock(this, it)
Loading…
Cancel
Save