Android Project Kick-Starter
An android project that serves as a starter template to help you quickly get started.
This project is work in progress. Feedback is welcome!
Description
The project is divided into 2 modules.
domain
is a library module that is meant to encapsulate domain and data access (network and db) code.
domain
"exports" a set of koin modules
that the app
module can use to inject domain
's services
(usually injected into viewmodels)
app
is the main module. It encapsulates all your activities, views, and viewmodels.
Getting Started
- Clone this repo to your local machine https://github.com/karimit/android-project-kickstarter.git
- Use android studio to rename the application package.
- Crashlytics integration:
- Create a new firebase project
- Add an android application for the -release- build type.
- Download google-services.json to src/release and remove src/release/google-services-template.json
- Add an android application for the -debug- build type (use the .debug package suffix).
- Download google-services.json to src/debug and remove src/debug/google-services-template.json
- Create a signing key for signing the release build. Take note of keystore password, password, and alias.
- Rename keystore-template.properties to keystore and fill out the placeholders with outputs from step 4.
DONE!
Requirements
- Android Studio 3.5+ (not tested on earlier versions)
- Java 8+
What's in it
- Kotlin
- Koin for dependency injection
- Androidx Android Jetpack libraries (lifecycle, viewmodel, navigation, savedstate and more)
- Kotlin Coroutines
- Ktlint - Kotlin Linter
- LeakCanary - Leak Reporting
- Material Components - Material Design UI components for Android
- Stetho - Network Traffic Inspector
- Timber - Logging library
- Crashlytics Integration
-- Crash reporting is disabled in the
debug
build by default. ChangeenableCrashReporting
to"true"
inapp
's build.gradle in thedebug
build type block to enable crash reporting for the debug build. -- ReleaseTree timber tree is planted by default. It reports errors and exception to Crashlytics. - Retrofit HTTP Client. Setup with OkHttp and some useful interceptors.
- ThreeTenABP Java Time backport
License
This project is licensed under the MIT License - see the LICENSE.md file for details
See something stupid?
- Suggestions & issues are welcome!