Kotlin Tooling Standards
Priority: P2 (RECOMMENDED)
Consistent build and quality verification tools.
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/thenconflicts with Kotlinwhen; use MockK (every/verify). - No Hardcoded Versions: Manage all versions in libs.versions.toml; never inline in build files.