Android - Enable app features at compile time
Sometimes some fetaures of your app must behave differently for different flavors o build type. Think about when you need to enable logging for a specific flavor only, or you have to disable crash reporting for your “dev build”. All this behaviours can be configured at compile time, insted of using many if/else blocks that are evaluated at runtime. In the following example I’ll use Gradle and Dagger. Use case: enable crash reporting only for production flavor....