Skip to content
A barebone MVVM Android project with some essential tools configured the right way for 2019 ^_^
Kotlin Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github/workflows
.idea
app
gradle/wrapper
.editorconfig
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

CircleCI

Android Barebone 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
  6. RxJava 2 - 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 (alpha) - 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 (💻 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. Make sure you study how each activity that hosts Fragment requires a separate 🔪 dagger module.
  • 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.

You can’t perform that action at this time.