An Android app as the assignment to fetch the data from the given API. Designed with clean architecture guidelines,modular approach, Repository Pattern, MVVM architectural pattern with Android Architecture Components.
Min API Level Supported : 16 (Jelly Bean)
Before running the project, please check if your gradle version matches the project's version
package-name: com.mvvmclean.trendingrepos
compileSdkVersion = 29
targetSdkVersion = 16
minSdkVersion = 16
buildToolsVersion = "29.0.2"
Android Studio 4.1.2 Build #AI-201.8743.12.41.7042882, built on December 20, 2020 Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.15.2
The Application is split into a three layer architecture inorder to provide clean separation of concerns - making the code easier to navigate and maintain.
- Data - Layer that holds APIs, Database, Cache
- Domain - Layer that holds Use Cases, and Model Objects. Business logic happens here.
- Application - Layer that holds presentation, Android components, Viewmodels, Dagger components/modules handles Dependency Injection, etc. MVVM exists at this layer.
The three layered architectural approach is majorly guided by clean architecture which provides a clear separation of concerns with its Abstraction Principle.
app/test/ - Unit tests
- test -> Right click on package name(com.demo.aboutcanada) -> Run Test In 'com.demo.aboutcanada'app/androidTest/ - Instrumentation tests
- androidTest -> Right click on package name(com.demo.aboutcanada) -> Run Test In 'com.demo.aboutcanada'
Following are the Libraries used:
- Material Design - Google material design UIs.
- Dagger2 - Dependency Injection lib with large community support.
- Retrofit - Network Http Client
- Jetpack
- Viewmodel - Channel between use cases and UI
- Data Binding - For binding of UI components in layouts to data sources, and coroutines support.
- Moshi - Data, Model & Entity JSON Parser that understands Kotlin non-nullable and default parameters
- okhttp-logging-interceptor - logs HTTP request and response data.
- Mockito - Mocking framework used in unit tests.
- kotlinx.coroutines - Library Support for coroutines, provides
runBlocking
coroutine builder used in tests - MockWebServer - web server for testing HTTP clients.
- Leak Canary - Leak Detection Library
- Espresso - Test framework to write UI Tests
- recyclerview-animators - Recycler View Animations
- Room Persistence Library - Robust database access while harnessing the full power of SQLite
- Robolectric - Android Unit Tests framework.
- Truth - Provides fluent assertions for Java and Android
- dependencies.gradle - Centralized versioning of gradle dependencies in a global file
- Fonts
- Dimension & String Values
- Themes & Styles
- Network Config