HomeWorkMVVM is an Android practical demo task for implementing a complete login function.
● Kotlin
● MVVM design pattern and Jetpack
● Room database
● Clean code architecture
● Unit tests for the ViewModel layer
● ViewBinding
● Koin dependency injection framework
● Coroutines
● Gradle version 8.0
● Gradle plugin version 8.2.2
● Compile SDK version API 34
● JAVA version 1.8
Open Android Studio,
Clone the repo,
https://github.com/maulikmi/HomeWorkMVVM.git
Build the project,
Connect the Android device and enable USB debugging,
Hit "Run". Done!
Library | About | Version |
---|---|---|
Room | Database | v2.6.1 |
Koin | Dependency injection framework | v2.2.2 |
Retrofit2 | Rest API call library | v2.9.0 |
Okhttp3 | HTTP client | v4.12.0 |
Gson | Convert Java objects into JSON and vice versa | v2.9.0 |
Timber | Logger | v5.0.1 |
Mockito | Unit testing | v4.7.0 |
JUnit | Unit testing | v4.13.2 |
The project structure follows a modular approach to organize codebase in a scalable manner. Here's an overview of the key folders:
├── app
│ ├── manifests
│ ├── java
│ │ ├── homeworkmvvm
│ │ │ ├── data
│ │ │ │ ├── local
│ │ │ │ │ ├── base
│ │ │ │ │ ├── login
│ │ │ │ ├── remote
│ │ │ │ │ ├── base
│ │ │ │ │ ├── login
│ │ │ │ │ │ ├── request
│ │ │ │ │ │ ├── response
│ │ │ ├── domain
│ │ │ ├── exts
│ │ │ ├── UI
│ │ │ │ ├── base
│ │ │ │ ├── login
│ ├── res
│ └── ...
- app: contains the main source code of the application.
- res: stores drawable, layout, dimens, colors, string resource files.
- manifests: Android manifests file.
- java: source code and test cases code.
- homeworkmvvm: project package name.
- data: contains local and remote data.
- domain: DI modules and base use case files.
- exts: common extension functions.
- UI: module wise activity, fragment & viewModel files.