GithubHelp home page GithubHelp logo

drjacky / mvvmtemplate Goto Github PK

View Code? Open in Web Editor NEW
762.0 15.0 117.0 46.97 MB

An Android Template with MVVM and Clean Architecture

License: MIT License

Kotlin 100.00%
kotlin clean-architecture rxjava2 navigation-component mvvm android template-project pagination-component flow coroutines

mvvmtemplate's Introduction

MVVMTemplate ๐Ÿงžโ€

Language License Actions Status Build Status Quality Gate Status FOSSA Status Android Arsenal CodeScene Code Health

A simple Android template that lets you create an Android project quickly.

How to use ๐Ÿ‘ฃ

Just click on Use this template button to create a new repo starting from this template.

Compose version โญ

For the compose version, which is under development, switch to feature/compose branch.

Features ๐Ÿ•น

Under Development ๐Ÿšง

  • Add CI
  • Use Kotlin DSL
  • Add Espresso, Instrumentation & Unit tests. To see a part of changes, click here.
  • Use Animations. To see changes, click here.
  • Use Hilt. To see changes, click here.
  • Migrate to Hilt 2.31. To see changes, click here.
  • Use Paging V3. To see changes, click here.
  • Use ViewBinding. To see changes, click here.
  • Migrate to JetPack Compose
  • Use detekt. To see changes, click here.
  • Add coroutines and flow. To see changes, click here.
  • Replace Preferences by DataStore. To see changes, click here.
  • Migrate from RxJava 2 to RxJava 3. To see changes, click here.
  • Add Custom Rx Adapter for Network Response Handling. To see changes, click here.

CI ๐Ÿญ

This template is using GitHub Actions as CI.

Available workflows listed as follows:

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 ๐Ÿงท

Contributing ๐Ÿค

Feel free to open an issue or submit a pull request for any bugs/improvements.

Result ๐Ÿ“บ

Compose

License โš–๏ธ

FOSSA Status

mvvmtemplate's People

Contributors

dependabot-preview[bot] avatar drjacky avatar fossabot avatar zahraheydari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mvvmtemplate's Issues

[BUG]: Showing the loading animation on the loaded list

Describe the bug
Showing the loading animation on the loaded list
To Reproduce
Steps to reproduce the behaviour:

  1. Internet & Fetch
  2. No Internet & See Error
  3. Internet & Retry
  4. Rotate & No Internet
  5. Fetch & See Error
  6. Internet & Retry
  7. Rotate

Expected behaviour
Ater following flow, must not see the loading

Screenshots

How to include a foreground location service with this architecture?

Hi Drjacky,

I want to add a foreground location service in my app (which is based on clean architecture MVVM pattern).

I want to know, in which manifest file, do I need to put the location permissions.

I believe it should be in the app module manifest file, but then during runtime, when I will check for the app permissions from my fragment, I need access to my app module (because manifest file with permission is located there).

So, if I tell my presentation module about the app module, this would breach the clean architecture principle.

In my current project:

  • Domain knows nothing

  • Data knows about Domain

  • Presentation knows about Domain

  • And App knows all the three

Edited: Never mind, I believe we have to add the permission in both the manifests, because:

  1. When added only in presentation module, the app crashes
  2. When added only in app module, there is a compiler error

Thanks again for your repo.

Thanks
Relive

[BUG]: Title goes here

Please provide a video showcasing how this template can be used. If you really want to use this as a template it should be easy to use another REST API by simply changing some data structures, layouts being used, etc., as this project is so massive (unbelieable how much work you put in it), it is difficult to find where to start and where to change something.

[BUG]: Title goes here

I don't understand why you have all those folders domain, presentation etc outside the app module, is this project supposed to be opened with Android Studio and work? Because it's not a typical Android project, I'm not being able to simply open it and run it.

[BUG]: JAVA_HOME is not set.

Describe the bug
A problem occurred configuring root project 'MVVMTemplate'.

=============================== Gradle Doctor Prescriptions ============================================
| JAVA_HOME is not set. |
| Please set JAVA_HOME so that switching between Android Studio and the terminal does not trigger a fu |
| ll rebuild. |
| To set JAVA_HOME: (using bash) |
| echo "export JAVA_HOME=$(/usr/libexec/java_home)" >> ~/.bash_profile |
| or ~/.zshrc if using zsh. |
| |
========================================================================================================

To Reproduce
Steps to reproduce the behaviour:

  1. Open this project template in macos.

Expected behaviour
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. Pixel 3]
  • OS: [e.g. Android10]
  • Version [e.g. 30]

Additional context
Add any other context about the problem here.

[BUG]: Showing no internet screen after rotation

Describe the bug
Showing no internet error after rotation

To Reproduce
Steps to reproduce the behaviour:

  1. Be sure there is an internet connection
  2. Fetch data
  3. Scroll one page
  4. Disconnect the internet
  5. See the error screen
  6. Connect the internet
  7. Fetch data (optional)
  8. Rotate the device
  9. You must not see the error screen but, you see!

Expected behaviour
After the error screen is gone, we must not see the error screen (without changing any condition) on the other orientation

Screenshots
N/A

Smartphone (please complete the following information):

  • Device: Pixel 3
  • OS: 10
  • Version 29

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.