Coder Social home page Coder Social logo

morristech / android-barebone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hossain-khan/android-barebone

0.0 1.0 0.0 368 KB

A barebone MVVM Android template project with some essential tools configured the right way for 2019 ^_^

License: Apache License 2.0

Kotlin 96.94% Java 3.06%

android-barebone's Introduction

CircleCI


What about template for 2021 and beyond?

While the template was made in 2019, it holds up well in 2020, however there are more cool stuff came around since then. You should always refer to Google's official projects for pointers. Here are some relevant references:


Android Barebone Template Project

A barebone MVVM architecture based Android project with some essential tools configured the right* way. See Android Architecture Blueprints v2 for more comprehensive app architecture example.

Inspiration: The architecture is inspired by combination of different project by Google and Android Community, such as:

Configured Essentials

There are few essentials that are added to the project. Best way to see what is included is to check the latest dependecies from app/build.gradle

Here are list of dependencies included:

  1. AndroidX
    1. AppCompat
    2. Material Theme
    3. ViewModel
    4. Lifecycle
    5. ConstraintLayout
    6. ViewPager 2
    7. Kotlin Extensions (KTX)
  2. Firebase Crashlytics
  3. Firebase Analytics
  4. Timber - android logging
  5. Dagger 2 - dependency injection for Activity and Fragment Upgraded to Dagger Hilt (alpha), see PR#38
  6. RxJava 3 - ReactiveX Java
  7. Retrofit 2 - REST API
  8. OkHttp - with logging interceptor
  9. Gson - JSON response parsing
  10. Mockito - unit test mocking
  11. Leak Canary 2 - automatic memory leak detection
  12. Kt Lint Format - An anti-bikeshedding Kotlin linter with built-in formatter

Optional Library and Integrations

You may need to delete optional features based on your need.

  1. CircleCI integration for CI/CD.

Pre-Requisite (:computer: TODO After cloning repo)

  • You must create a Firebase project and use the google-services.json from your project. A placeholder google-services.json is provided so that app compiles.
  • You must update package name and application ID where applicable.
  • Remove feature X, Y, and Y activities and related resources. However, it may be beneficial to keep them as reference point at initial phase of the project.
  • Remove fragment A, B, and C and related files like ViewModel and Layout files.
  • Remove unused libraries that are added in app/build.gradle
  • Also update your application's theme color. See styles.xml

Preview

Currently the barebone app has following sample activities:

  • MainActivity - Hosts fragments using ViewPager and navigates using BottomNavigationView.
  • Feature X - showcases how REST call is made using injected service in ViewModel.
  • Feature Y - showcases how RecyclerView can be used in conjunction with DiffUtils.
  • Feature Z - showcases how Fragment can also have injection and use service in ViewModel.

android-barebone's People

Contributors

hossain-khan avatar

Watchers

 avatar

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.