A simple starter project for Android that should clear up all the annoying boiler plate necessary for starting a new Android project. Inspired heavily by Fernando Cejas's Clean Architecture.
This starter project includes the following libraries:
- Android Support Library
- Dagger 2
- A light dependency injection framework built in Java
- Butterknife
- View binding framework that allows you to skip all those
findViewById()
calls
- View binding framework that allows you to skip all those
- RxJava
- Library that handles multi-threading, single way data-flow, and in-flight data manipulation
- Picasso
- Simple image loading and cacheing library
- Gson
- JSON serialization/deserialization library
- OkHttp
- Library that handles networking and caching of network requests
- Retrofit
- Network layer abstraction library that turns your REST client into an interface
- Auto Value
- Simple POJO generating library
- Adapter Delegates
- Allows recycler adapters to delegate functionality to adapter delegates, making multi-layout recycler views easier to work with
- Store
- Data store abstraction library that makes retrieving and persisting data from and to external sources very easy.
- Leak Canary
- Library that detects memory leaks in your app
- Timber
- Simple custom logging library for Android
- Stetho
- Stetho allows you to debug network calls, view your sqlite database on-device, and has many other neat features
- Crashlytics
- Crashlytics provides post-release error and crash reporting from consumer devices
Before you get started on creating your own application from this starter project, make sure you do the following:
- Modify the package name in both the project level build.gradle file and AndroidManifest.xml files in the data and app modules. You should also re-name the source set packages to match.
- Change the applicationId and update all build tool and dependency versions to latest.
- Remove any files you deem unnecessary (Don't need a drawer? Delete drawer related files)
- If you wish to remove git history, simply delete the .git folder and create a new one with
git init
- Customize the
AppTheme
to whatever you desire, or modify thecolors.xml
file to get a new palette going. - Setup the
nav_header.xml
anddrawer_menu.xml
layouts to your own specs. - Either delete the
feature
package in each module, or use it as a guideline for your application flow. - Code away!
Fork it, modify it in any way you want, I don't care what you do. You don't even have to give me credit (It would be appreciated though :) )
If you have any issues with this starter project, or would like to make suggestions, start a discussion in the issues.
Thefeature
package should have a good example of how to design your application flow within each module.Testing examples would be setup for each unit within thefeature
anduser
packages. This would establish a small guide on how to write unit tests throughout your own application.- Add an actual example app for the feature packages
- Create a more descriptive readme that would have a more in-depth discussion on how this app is structured.
- Comments. Comments. Comments.