This template provides starting point for Kotlin Android app, following Klika quality guidelines, with implemented authentication following OAuth2 standard.
- Latest Android Studio
- Homebrew (for setup script - required for installation of ktlint)
- Ruby + overcommit gem
scripts/setup
This script will:
- Setup overcommit hooks
- Install ktlint (required for hooks)
Android lint is recommended to be run only on CI, since it can be slow for larger projects, while ktlint can be run on every commit.
To get basic idea about configuration approach read 12factor.
Different build types are expected to have different configuration and it is stored in .properties
files. Inside app module, by default, debug.properties
and release.properties
are expected. Example is provided in config-example.properties
.
Use Klika quality guidelines for general development references.
This project is following official Kotlin codestyle, which is also enforced by ktlint. It follows both codestyle from kotlinlang.org and Android Kotlin styleguide.
This project is following naming conventions from ribot android guidelines.
Use GitFlow development workflow with tests included.
- no conflicts with target branch
- pass CI tests
- code review approval
Networking is implemented via Retrofit, with Http client provided by OkHttp that provides easy API communication and response parsing using Gson.
MVVM is implemented with help of databinding and ViewModel of Android Architecture Components.
Project is implemented with Kotlin Coroutines + Flow.
All dependencies in application are injected using JSR-330(@Inject
, @Singleton
) annotations. Dagger2 is used to make all of it easier.
This project will run static code analyser on every commit and full test suite on git push.
This template is using ktlint for static code analysis. It is also using default android lint. All offenses are automatically tracked and prevented on every commit. This feature is handled by Overcommit git hook manager.
We are using JUnit5 Framework.
AppCenter is recommended for CI.