When starting a new project, I always find getting the tools up and running quickly is a pain, so I wanted something for Kotlin which already had everything setup and working.
This aims to be a starter repo with all of the following tooling setup:
- Junit5
- Jacoco
- Github actions
- Codecov
- ktlint
- Mockk
- Dokka
- r8
- Dagger2
- Logback Android
- Papertrail
- Unit test examples
- Instrumented test examples
Coverage is provided for:
- Instrumented on-device android tests
- JVM unit tests from the android app
- JVM unit tests from the library They are each uploaded separately, as I had issues with the code cov action providing more than a single report at once. Codecov can handle the multiple uploads and merge them together anyhow.
Secrets are passed in via local.properties
or .env
or via environment variables. There is an example in the GH workflows which shows how to pass in via
local.properties
and via environment variables. It will also work with a .env
in the app directory.
Do not do squash merges to the staging or production branches, or in the mergebacks to main, or there will be nothing but trouble. See the following for more details: https://github.com/orgs/community/discussions/10809
https://github.com/compscidr/hello-kotlin-android/compare/staging...main
https://github.com/compscidr/hello-kotlin-android/compare/production...staging
NOTE: the mergeback should be a merge commit, not a squash commit or will result in a diff when comparing branches later on.
Ideally you find no diff: https://github.com/compscidr/hello-kotlin-android/compare/main...production https://github.com/compscidr/hello-kotlin-android/compare/main...staging https://github.com/compscidr/hello-kotlin-android/compare/staging...production
TODO: