# Kotlin Tooling

> Configure Kotlin build and quality tooling, including Gradle Kotlin DSL, Version Catalogs, KMP, ktlint, Detekt, MockK, coverage, and quality plugins. Use for Kotlin-specific build, lint, test-tool, or coverage setup; defer Java-only tooling and Spring test behavior.

- Skill: `hoangnguyen0403/kotlin-tooling` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds add hoangnguyen0403/kotlin-tooling`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hoangnguyen0403/kotlin-tooling/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: HoangNguyen0403 (https://skillmd.com/u/hoangnguyen0403)
- Updated: 2026-08-19
- Page: https://skillmd.com/skills/hoangnguyen0403/kotlin-tooling

---

# Kotlin Tooling Standards

## **Priority: P2 (MEDIUM)**


## Implementation Guidelines

- **Gradle DSL**: Use Kotlin DSL (`build.gradle.kts`) exclusively — type safety and better IDE support.
- **Version Management**: Use Version Catalogs (`libs.versions.toml`).
- **Linter**: Use **Ktlint** for formatting and **Detekt** for complexity/code-smell analysis.
- **Testing**: Use **MockK** for mocking (first-class Kotlin support). Use **JUnit 5**.
- **Assertions**: Use **Truth** or **Kotest Assertions** for fluent, readable test output.

## Anti-Patterns

- **No Groovy Gradle**: Use Kotlin DSL (build.gradle.kts) exclusively; avoid legacy build.gradle.
- **No Mockito in Kotlin**: `when/then` conflicts with Kotlin `when`; use MockK (`every/verify`).
- **No Hardcoded Versions**: Manage all versions in libs.versions.toml; never inline in build files.

## References

- [MockK Templates & libs.versions.toml Setup](references/testing-tooling.md)

