An Android kotlin showcase project by using Jetpack Compose UI.
Using Android + Jetpack Compose UI + Kotlin + ktlint + Detekt + Gradle Kotlin DSL + Version Catalog(TOML)
Project configurations:
minSdkis25(Android 7.1.1)targetSdkis36(Android 16 - Baklava)
- 100% Kotlin-only template.
- 100% Gradle Kotlin DSL setup.
- Dependency versions managed via
Gradle Version Catalog. - Sample Espresso, Instrumentation & JUnit tests.
- Kotlin Static Analysis via detekt and ktlint.
This template is using Gradle Kotlin DSL as well as the Plugin DSL to setup the build.
Dependencies are centralized inside the Gradle Version Catalog in the libs.versions.toml file in the gradle folder.
This template is using detekt to analyze the source code,
with the configuration that is stored in the detekt.yml file (the file has been generated with the detektGenerateConfig task).
It also uses the detekt-formatting plugin which includes the ktlint rules (see https://detekt.dev/docs/rules/formatting/).
./gradlew ktlintFormat./gradlew dependencyUpdates./gradlew ktlintCheck./gradlew detekt./gradlew staticCheck- Add following line before
pluginsin your module-levelbuild.gradle.kts:
apply(from = "../config/jacoco.gradle.kts")- Add
jacocoplugin to the module which you want to check. Modify your module-levelbuild.gradle.ktsas following:
plugins {
// Your other plugins.
jacoco
}- After
Syncproject, you'll get two tasksjacocoTestReportandjacocoCoverageVerification. Run them as you wish.
Add sonarqube plugin to the module which you want to check. Modify your module-level build.gradle.kts as following:
plugins {
// Your other plugins.
alias(libs.plugins.sonarqube)
}