vipulshah2010 / FoodApp

Proof of concept for food app [JetPack + Coroutines + Flow + MockK + JaCoCo coverage + SonarQube]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FoodApp

License Build Status

FoodApp is a small playground application built using MVVM architecture.
This project is primarily built with purpose of trying out new android tech stack.
It showcase Usecase and Repository architecture pattern for loading data from network and persisting it in database.


Library and Frameworks

  • Minimum SDK level 21
  • Kotlin based, Coroutines + Flow for asynchronous.
  • Dagger-Hilt (alpha) for dependency injection.
  • JetPack
    • LiveData - notify domain layer data to views.
    • Lifecycle - dispose of observing data when lifecycle state changes.
    • ViewModel - UI related data holder, lifecycle aware.
    • Room Persistence - construct a database using the abstract layer.
  • Architecture
    • MVVM Architecture (View - DataBinding - ViewModel - Model)
    • Repository pattern
  • Retrofit2 & OkHttp3 - construct the REST APIs and paging network data.
  • Retrofit - A type-safe HTTP client for Android and Java.
  • Gson - JSON library for Kotlin and Java.
  • coil
  • Material-Components - Material design components like ripple animation, cardView.

Code Coverage and Reporting

  • This project uses Jacoco configuration to measure code coverage and currently the most widely used.
  • SonarQube is used for inspecting the Code Quality and Security codebase.
  • SonarQube consumes Jacoco test coverage report and displays it on sonarcloud

Run following command from root folder to generate JaCoco reports and view test coverage on sonarcloud

./gradlew clean jacocoTestDebugUnitTestReport sonarqube

Planned workflow:

  • More unit test coverage
  • Instrumentation test coverage
  • Fix Shared element transition

Architecture

FoodApp is based on MVVM architecture and a repository pattern.

Find this repository useful? ❤️

follow me on twitter! 🤩

License

Designed and developed by 2020 vipulshah2010 (Vipul Shah)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Proof of concept for food app [JetPack + Coroutines + Flow + MockK + JaCoCo coverage + SonarQube]

License:Apache License 2.0


Languages

Language:Kotlin 97.5%Language:Java 2.5%