This template includes several libraries and startup configurations that can be used by most Android apps.
You can find the app configuration (applicationId
, versionCode
, versionName
, etc) in AppConfig.kt.
This template follows the gradle
convention plugins to share gradle
logic between modules. These are the convention plugins available in this template:
This plugin configures a compose application. Use it in your application
build.gradle
file, like this: id("my.android.compose.application")
.
This plugin configures an Android application. Use it in your application
build.gradle
file, like this: id("my.android.application")
.
This plugin configures Jacoco in the application module. Use it in your application
build.gradle
file, like this: id("my.android.jacoco.application")
.
This plugin configures a feature module. It includes Hilt for dependency injection. Use it in your application
build.gradle
file, like this: id("my.android.jacoco.application")
.
This plugin configures a Hilt for the app module. Use it in your application
build.gradle
file, like this: id("my.android.hilt")
.
This plugin configures a compose library module. Use it in any build.gradle
module file where you need compose
, like this: id("my.android.library.compose")
.
This plugin configures a non-compose library module. Use it in any build.gradle
Android module file, like this: id("my.android.library")
.
This plugin configures Jacoco for an Android library module. Use it in any build.gradle
library module where you want to have Jacoco
coverage, like this: id("my.android.jacoco.library")
.
This plugin configures test dependencies for an Android library module. Use it in any build.gradle
where you need to add tests, like this: id("my.android.library.test")
.
This plugin configures Room
for a library module. Use it in any build.gradle
where you need a Room
database, like this: id("my.android.room.library")
.
This plugin configures a pure Kotlin
library module. Use it in any build.gradle
where you want a pure Kotlin
module, like this: id("my.kotlin.library")
.
This plugin configures a tests for a pure Kotlin
library module. Use it in any build.gradle
where you want a pure Kotlin
module, like this: id("my.kotlin.library.test")
.
The template includes a Build.yaml
file that executes the following tasks when pushing a commit to master or when creating a pull request:
./gradlew detekt
./gradlew lintDebug
./gradlew assembleDebug
./gradlew testDebug testDebugUnitTest
The commit-msg
Git Hook
is included. It enforces conventional commits.
You can add your custom lint
rules in analysis/lint-custom-rules
. Also you can modify the default lint
configuration in lint.config.xml
.
To run lint
you can use ./gradlew lintDebug
.
The version catalogue contains definitions and bundles for the following libraries:
- CoreKtx
- Lifecycle
- OkHttp3
- Ktor
- Kotlin Serialization
- Kotlin Immutable Collections
- Kotlin Coroutines
- Kotlin DateTime
- AndroidX Arch Core Testing
- Core Testing
- Espresso
- jUnit
- Paparazzi
- Turbine
- Mockk
- Strikt
- Coroutines Testing
You can find a custom theme definition based on Material3
for compose
in Theme.kt. This custom definition consists of dark and light theme colors, custom typography, custom shapes and a Padding
class with predefined values.