Last active
October 9, 2022 10:57
-
-
Save reactivedroid/28d7f4b8b93499ebad96dd7a9c331c8d to your computer and use it in GitHub Desktop.
Abstraction over [BuildConfig] for accessing its values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Abstraction over [BuildConfig] for accessing its values | |
*/ | |
interface BuildConfigProvider { | |
/** | |
* Gets the configuration for the given [key] | |
*/ | |
fun getValue(key: String): String | |
/** | |
* Sets the [selectedFlavor] as selected by the user eg: prod, staging | |
*/ | |
fun setFlavor(selectedFlavor: String) | |
/** | |
* Return the [selectedFlavor] as selected by the user eg: prod, staging | |
*/ | |
fun getFlavor(): String | |
/** | |
* Returns all the flavors as supported by the app | |
*/ | |
fun allFlavors(): List<String> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment