
Compiler-accurate by default.
Symbol resolution, type attribution, comments, and formatting are preserved on every run. Recipes operate on the structural model, not regex.
Standard library renames, kotlinx bumps, Gradle plugin upgrades, and Android deprecation cleanup across hundreds of repos. Deterministic, agent-ready.
Moderne builds a compiler-accurate model of every Kotlin file, with full symbol and type resolution. Recipes resolve across modules instead of pattern-matching strings.
Kotlin 2.0 shipped May 2024. Deprecated 1.x APIs became errors in Kotlin 2.1.
Moderne helps keep our codebases cleaner, safer, and easier to evolve. It is a major unlock for teams that want to spend more time shipping and less time maintaining.
Moderne supports Kotlin from 1.x through 2.x, with migration recipes covering the full transition. The UpgradeToKotlin2 recipe automates standard library renames (toLowerCase to lowercase, appendln to appendLine, Enum.values to Enum.entries, capitalize and decapitalize), kotlinx library bumps (coroutines, datetime, serialization) targeting the latest supported versions, Gradle plugin upgrades to 2.x, and removal of deprecated build properties.
OpenRewrite ships a Kotlin DSL for declarative recipe authoring. A K2 compiler plugin reads paired before-and-after Kotlin lambdas and synthesizes a Recipe subclass at compile time, the same way Refaster’s annotation processor works for Java. Recipe authors stay in idiomatic Kotlin with no annotations, no separate template class, and no runtime reflection. Pattern-shaped refactorings use the declarative shape. Structural recipes that need annotations or lexical context drop into an imperative KotlinVisitor scope.
IntelliJ inspections are IDE-bound and operate per-file in the developer’s editor. Detekt is static analysis that flags issues but doesn’t coordinate fixes across repositories. Moderne provides deterministic transformations that apply across hundreds of repositories in a single coordinated run, delivering reviewable pull requests at scale. IDE inspections require a developer to be present. Moderne provides the portfolio-wide automation layer that engineers and coding agents call when they need transformations applied at scale.
Yes. Build.gradle (Groovy DSL) and build.gradle.kts (Kotlin DSL) files parse into the LST alongside Maven coordinates and Gradle version catalogs. The UpgradeKotlinGradlePlugins recipe handles Kotlin plugin version upgrades across both build file formats, and dependency management recipes apply consistently regardless of which DSL a repository uses.
Moderne’s migration model runs in two tiers. Tier 1 covers transformations with a clear, known target state and applies them automatically. Examples include case conversions, appendLine swaps, and enum entries replacements. Tier 2 surfaces changes with behavioral implications and flags them with inline markers so engineers decide before any transformation runs. Engineers get the automated wins immediately and a prioritized list of what needs a decision.
Yes. Kotlin is fully represented in the OpenRewrite Lossless Semantic Tree, giving coding agents a compiler-accurate model of Kotlin source code to reason over. Recipes provide the deterministic execution layer agents call when they need transformations applied safely and consistently across repositories. This is the same Agent Tools infrastructure (Prethink, Trigrep, Skills, MCP) Moderne provides across Java, JavaScript, Python, and C# codebases.
Modernize Kotlin once. Then keep moving with the ecosystem.