👀 Writing Just Eat Interview Solution App using Android Architecture Components, in 100% Kotlin, using Android Jetpack Components.
Before every commit, make sure you run the following commands:
./codeAnalysis
To test code coverage, run the following bash script:
./coverage
If you have Fastlane installed, you can run the develop lane:
fastlane branch conf:debug
To check for dependency updates, run the following command:
./gradlew dependencyUpdate
To inspect the app database, use Android Studio database inspector by running the app on a Device >=26 API Level
Refer to this issue, if you get any issues running the lint commands on the terminal 🚀
Develop an application that visualizes a restaurant list:
-
Favourite restaurants are at the top of the list, your current favourite restaurants are stored locally on the phone.
-
Restaurant is either open (top), you can order ahead (middle) or a restaurant is currently closed (bottom).
-
Always one sort option is chosen and this can be best match, newest, rating average, distance, popularity, average product price, delivery costs or the minimum cost.
-
Tech-stack
- Kotlin - a cross-platform, statically typed, general-purpose programming language with type inference.
- Coroutines - perform background operations.
- Flow - handle the stream of data asynchronously that executes sequentially.
- KOIN - a pragmatic lightweight dependency injection framework.
- Jetpack
- Timber - a highly extensible android logger.
- Leak Canary - a memory leak detection library for Android.
-
Architecture
- Clean Architecture
- MVVM - Model View View Model
-
Tests
- Unit Tests (JUnit) - a simple framework to write repeatable tests.
- MockK - mocking library for Kotlin
- Kluent - Fluent Assertion-Library for Kotlin
- Kakao - Nice and simple DSL for Espresso in Kotlin
-
Gradle
- Gradle Kotlin DSL - For reference purposes, here's an article explaining the migration.
- Plugins
- Ktlint - creates convenient tasks in your Gradle project that run ktlint checks or do code auto format.
- Detekt - a static code analysis tool for the Kotlin programming language.
- Spotless - format java, groovy, markdown and license headers using gradle.
- Dokka - a documentation engine for Kotlin, performing the same function as javadoc for Java.
- jacoco - a Code Coverage Library
-
CI/CD
- Github Actions
- Fastlane
All the dependencies (external libraries) are defined in the single place - Gradle buildSrc
folder. This approach allows to easily manage dependencies and use the same dependency version across all modules.
The screenshot below shows the tests that are done on the repo:
The UI Tests are tested on an Emulator Running Android 10 (API 29) - Might be flaky on some API levels.
The UI tests are written using Kakao
The Unit Tests here basically test the Repository Implementation
The Unit Tests here test ViewModel
More tests can be added