Skip to content

Repository files navigation

Leo Version Kotlin Version AGP Gradle

Android Studio Build Java Version Compatibility Java Version NDK

CodeFactor

An Android kotlin showcase project by using Jetpack Compose UI.

Using Android + Jetpack Compose UI + Kotlin + ktlint + Detekt + Gradle Kotlin DSL + Version Catalog(TOML)

Attention

Project configurations:

  • minSdk is 25 (Android 7.1.1)
  • targetSdk is 36 (Android 16 - Baklava)

Features

  • 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.

Gradle Setup

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.

Static Analysis

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/).

Runs the ktlint formatter on all kotlin sources in this project.

./gradlew ktlintFormat

Displays the dependency updates for the project.

./gradlew dependencyUpdates

Runs ktlint on all kotlin sources in this project.

./gradlew ktlintCheck

Runs detekt

./gradlew detekt

Check All

./gradlew staticCheck

Gradle plugin for updating a project version catalog

version-catalog-update-plugin

How to enable and run jacoco

  1. Add following line before plugins in your module-level build.gradle.kts:
apply(from = "../config/jacoco.gradle.kts")
  1. Add jacoco plugin to the module which you want to check. Modify your module-level build.gradle.kts as following:
plugins {
    // Your other plugins.
    jacoco
}
  1. After Sync project, you'll get two tasks jacocoTestReport and jacocoCoverageVerification. Run them as you wish.

Enable sonarqube

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)
}

About

The Android Showcase project shows the modern Android application development.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages