Shipping Kotlin on JVM or Android means more than correct syntax—configure static analysis, tests, dependency scanning, logging, and coroutine discipline for services and mobile releases.
Checklist
- Enable
-Xexplicit-apior strict module boundaries for libraries when appropriate - Detekt/ktlint in CI; treat warnings as debt with a burn-down plan
./gradlew teston every PR; JVM tests plus Android instrumented tests where applicable- Pin Kotlin, Gradle, and AGP versions; run dependency vulnerability scans
- Structured logging (slf4j/logback), not raw
printlnin production servers - Never block Main dispatcher; avoid
runBlockingon request threads - Document Java interop boundaries with nullability annotations for APIs
- ProGuard/R8 rules reviewed when shrinking Android releases
Important interview questions and answers
- Q: Why Detekt in CI?
A: Enforces style and complexity rules Kotlin compiler does not catch—keeps coroutine and API mistakes visible in review. - Q: runBlocking in production?
A: Avoid on threads serving users—use suspend endpoints; runBlocking is for main() bridges and tests only.
Self-check
- Name two tools for Kotlin static analysis.
- Why avoid println in server production?
Track summary
You covered Kotlin from syntax and null safety through OOP, collections, functional features, generics, delegation, exceptions, coroutine concepts, stdlib idioms, Gradle tooling, file I/O, testing, Java interop, Android context, and interview habits. Kotlin's sweet spot is Android, JVM services with Java libraries, and teams wanting safer, concise code on existing JVM investments.
Next steps
- Build a small Gradle CLI or Ktor HTTP service with tests
- Open Android Studio and complete a Compose tutorial locally
- Add kotlinx-coroutines and practice
runTestwith Flow collectors - Compare patterns with Java, Go, and C# tracks
- Read official Kotlin docs on coroutines and multiplatform when expanding beyond JVM
Tip: This lesson closes the track with summary and next steps—run Detekt and ./gradlew test before shipping.
Interview prep
- Detekt purpose?
Static analysis for style, complexity, and coroutine misuse beyond compiler.
- CI must run?
./gradlew test, lint/detekt, dependency scanning; avoid runBlocking on workers.