- Configure the flavor to mockDebug for development
- Configure the flavor to cloudDebug for using internet with real data
Running UI tests with only the mock flavor will ensure consistent. Plus, you don't need the server to be online ;)
./gradlew connectedMockDebugAndroidTest
- There is a flavor dimension "api", with the possible values being mock, cloud.
- The mock flavor is especially useful since it feeds the UI with static preconfigured data during development time even if TDD is not followed, which allows the developer to exercise the UI with all the edge cases. If espresso is also supported it's the recommended flavor, because of its predictability.
- The cloud flavor means that data will be obtained using Retrofit from somewhere in the cloud.
Environment variables such as server url are configured through buildSrc/src/main/kotlin/Environment.kt
- This app is packaged by feature. What it means is that if it has a feature called login and another called landing the following tree is expected:
ui
|
\ login
\ landing
\ common
domain
|
\ login
\ landing
\ common
utils
ui.common is a place for generic code shared among different feature
Which is an advantage once the app has over 20 activities and presenters.
- Configure retrofit interceptor to inspect network traffic in debug mode
- Proguard, R8, D8 not configured
- For release builds, configure cleartext as allowed
- For release builds, set up signing key properly