Revert capitalization + add suppress

pull/458/head
mlykotom 2 years ago
parent a1d7a90766
commit b9c89952f1

@ -1,3 +1,6 @@
import com.google.samples.apps.nowinandroid.FlavorDimension
import com.google.samples.apps.nowinandroid.NiAFlavor
/*
* Copyright 2022 The Android Open Source Project
*
@ -26,7 +29,7 @@ android {
// The UI catalog does not depend on content from the app, however, it depends on modules
// which do, so we must specify a default value for the contentType dimension.
missingDimensionStrategy("contentType", "demo")
missingDimensionStrategy(FlavorDimension.contentType.name, NiAFlavor.demo.name)
}
packagingOptions {

@ -6,6 +6,7 @@ import com.android.build.api.dsl.CommonExtension
import com.android.build.api.dsl.ProductFlavor
import org.gradle.api.Project
@Suppress("EnumEntryName")
enum class FlavorDimension {
contentType
}
@ -13,9 +14,10 @@ enum class FlavorDimension {
// 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.
// These two product flavors reflect this behaviour.
@Suppress("EnumEntryName")
enum class NiAFlavor(val dimension: FlavorDimension, val applicationIdSuffix: String? = null) {
DEMO(FlavorDimension.contentType),
PROD(FlavorDimension.contentType, ".prod")
demo(FlavorDimension.contentType),
prod(FlavorDimension.contentType, ".prod")
}
fun Project.configureFlavors(

Loading…
Cancel
Save