Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drjacky/mvvmtemplate
An Android Template with MVVM and Clean Architecture
https://github.com/drjacky/mvvmtemplate
android android-template clean-architecture cleanarchitecture compose coroutine coroutines coroutines-android flow gradle hilt jetpack-compose kotlin kotlin-dsl mvvm navigation-component pagination-component rxjava2 template-project
Last synced: 1 day ago
JSON representation
An Android Template with MVVM and Clean Architecture
- Host: GitHub
- URL: https://github.com/drjacky/mvvmtemplate
- Owner: Drjacky
- License: mit
- Created: 2020-04-18T15:19:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T20:21:45.000Z (6 months ago)
- Last Synced: 2024-12-20T08:05:28.899Z (1 day ago)
- Topics: android, android-template, clean-architecture, cleanarchitecture, compose, coroutine, coroutines, coroutines-android, flow, gradle, hilt, jetpack-compose, kotlin, kotlin-dsl, mvvm, navigation-component, pagination-component, rxjava2, template-project
- Language: Kotlin
- Homepage:
- Size: 45.9 MB
- Stars: 841
- Watchers: 16
- Forks: 125
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# MVVMTemplate ๐งโ
![Language](https://img.shields.io/badge/Kotlin-2.0.0-blue) ![License](https://img.shields.io/github/license/Drjacky/MVVMTemplate?logo=MIT) [![Actions Status](https://github.com/Drjacky/MVVMTemplate/workflows/Pre%20Merge%20Checks/badge.svg)](https://github.com/Drjacky/MVVMTemplate/actions) [![Build Status](https://github.com/Drjacky/MVVMTemplate/workflows/Android%20CI/badge.svg)](https://github.com/Drjacky/MVVMTemplate/actions) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Drjacky_MVVMTemplate&metric=alert_status)](https://sonarcloud.io/dashboard?id=Drjacky_MVVMTemplate)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FDrjacky%2FMVVMTemplate.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FDrjacky%2FMVVMTemplate?ref=badge_shield)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-MVVMTemplate-green.svg?style=flat)](https://android-arsenal.com/details/1/8368) [![CodeScene Code Health](https://codescene.io/projects/29433/status-badges/code-health)](https://codescene.io/projects/29433)##
A simple Android template that lets you create an **Android** project quickly.
## How to use ๐ฃ
Just click
on [![Use this template](https://img.shields.io/badge/-Use%20this%20template-brightgreen)](https://github.com/Drjacky/MVVMTemplate/generate)
button to create a new repo starting from this template.## Compose version โญ
For the compose version, which is under development, switch
to [feature/compose](https://github.com/Drjacky/MVVMTemplate/tree/feature/compose) branch.## Features ๐น
- 100% Kotlin-only template
- Following [Clean Architecture approach](https://proandroiddev.com/mvvm-with-clean-architecture-c2c021e05c89)
- Following MVVM Architectural Design Pattern
- Template Project
- [RxJava 3](https://github.com/ReactiveX/RxJava) - Reactive Extensions for the JVM
- [Coroutines](https://developer.android.com/kotlin/coroutines) - A concurrency design pattern library
- [Flow](https://developer.android.com/kotlin/flow) - Built on top of coroutines and is stream of data that can be computed asynchronously
- Simplest Adapter Ever (based on this [workaround](https://proandroiddev.com/the-best-android-recycler-adapter-youve-ever-seen-probably-177e25279a28))
- Github Actions - CI
- [Hilt](https://dagger.dev/hilt/) - Dependency Injection framework
- [Transition](https://developer.android.com/guide/navigation/navigation-animate-transitions) - Animation
- [Paging V3](https://developer.android.com/topic/libraries/architecture/paging/v3-overview) - Pagination
- [View Binding](https://developer.android.com/topic/libraries/view-binding) - View Binding
- [OkHttp3](https://github.com/square/okhttp) - Network interceptor
- [Retrofit](https://github.com/square/retrofit) - HTTP client
- [Glide](https://github.com/bumptech/glide) - Loading images
- [Timber](https://github.com/JakeWharton/timber) - Log
- [Gson](https://github.com/google/gson) - JSON library
- [Material Components](https://github.com/material-components/material-components-android) - Material Design
- [Lottie](https://airbnb.design/lottie/) - Vector animation library
- [Kotlin DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html) - Alternative syntax to
the Groovy DSL
- [Detekt](https://github.com/detekt/detekt) - Static code analysis for Kotlin
- [Gradle Doctor](https://github.com/runningcode/gradle-doctor) - Gradle build scan plugin
- [Navigation](https://developer.android.com/guide/navigation) - Navigate through the app
- [LeakCanary](https://square.github.io/leakcanary/) - Memory leak detection
- [Chucker](https://github.com/ChuckerTeam/chucker) - An HTTP inspector for Android & OkHTTP
- [StrictMode](https://developer.android.com/reference/android/os/StrictMode) - A developer tool
which detects things you might be doing wrong by accident
- [Dark/Light Theme](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme) -
Support dark/light themes
- [DataStore](https://developer.android.com/topic/libraries/architecture/datastore) - Data storage
solution that allows you to store key-value pairs or typed objects
- [AutoDispose](https://uber.github.io/AutoDispose/) - Automatically binding the execution of RxJava
streams to a provided scope
- [Dependency Analysis](https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin) - Dependency analysis android gradle plugin
- [Sonatype Scan Gradle Plugin](https://github.com/sonatype-nexus-community/scan-gradle-plugin)-
Gradle plugin that scans the dependencies of a Gradle project using Sonatype platforms: OSS Index
and Nexus IQ Server.## Under Development ๐ง
- ~~Add CI~~
- ~~Use Kotlin DSL~~
- Add Espresso, Instrumentation & Unit tests. To see a part of changes, click [here](https://github.com/Drjacky/MVVMTemplate/pull/18).
- ~~Use Animations. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/commit/2fc51ef6ff82c4d43168e3ae0124a30c4ec3bfff).~~
- ~~Use Hilt. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/commit/b8af89bb74e5d615e9704c9f3ce35befd11811ea).~~
- ~~Migrate to [Hilt 2.31](https://github.com/google/dagger/releases/tag/dagger-2.31). To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/commit/792d2ba54d214b3ef10862777fc386e7be5790f4).~~
- ~~Use Paging V3. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/pull/4/files).~~
- ~~Use ViewBinding. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/commit/cfc907532fa991cd8de3b295644bfdff88d67ceb).~~
- Migrate to [JetPack Compose](https://developer.android.com/jetpack/compose)
- ~~Use detekt. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/pull/6/files).~~
- ~~Add coroutines and flow. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/pull/7/files).~~
- ~~Replace Preferences by DataStore. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/commit/285892ce098e2a069324910a213b78cac2e643e8).~~
- ~~Migrate from RxJava 2 to RxJava 3. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/pull/11).~~
- ~~Add Custom Rx Adapter for Network Response Handling. To see changes, click [here](https://github.com/Drjacky/MVVMTemplate/pull/13/files).~~## CI ๐ญ
This template is using [**GitHub Actions**](https://github.com/Drjacky/MVVMTemplate/actions) as CI.
Available workflows listed as follows:
- [Validate Gradle Wrapper](.github/workflows/gradlew-validation.yml) - Checks the gradle wrapper has a valid checksum.
- [Pre Merge Checks](.github/workflows/pre-merge.yml) - Runs `build` task.
- [Android](.github/workflows/android.yml) - Runs `assembleDebug` task.## Tasks ๐ง
- Gradle Doctor: `dependencyUpdates` - Displays the dependency updates for the project.
- Detekt: `detektAll` - Run the static Kotlin code analysis for the whole project at once.
- The Dependency Analysis: `buildHealth` - Provides advice for managing dependencies and other
applied plugins.
- Sonatype Scan Gradle Plugin - AKA Sherlock Trunks: `ossIndexAudit` - Scans the dependencies of a
Gradle project using Sonatype platforms; OSS Index and Nexus IQ Server.## References ๐งท
- [The Punk API](https://punkapi.com/)
- [Right or Left animation by Marco Martina on LottieFiles](https://lottiefiles.com/21141-right-or-left)
- [Loading Beer animation by Hashim Irfan on LottieFiles](https://lottiefiles.com/30697-loading-beer-animation)## Contributing ๐ค
Feel free to open an issue or submit a pull request for any bugs/improvements.
## Result ๐บ
### Compose## License โ๏ธ
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FDrjacky%2FMVVMTemplate.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FDrjacky%2FMVVMTemplate?ref=badge_large)