A Gradle plugin for linting and formatting Kotlin code using ktlint with zero configuration and fast incremental builds.
Kotlinter Gradle is a Gradle plugin that integrates the ktlint engine to lint and format Kotlin source files. It provides a seamless, configuration-free setup for Kotlin projects, ensuring code quality and consistency while leveraging Gradle's build optimizations for speed.
Kotlin developers using Gradle for JVM, Multiplatform, or Android projects who want to enforce code style and linting rules as part of their build process.
Developers choose this plugin for its zero-configuration setup that works out of the box, its fast performance through incremental builds and parallelization, and its seamless integration with existing Gradle workflows and .editorconfig files.
Painless, fast ktlint plugin for Gradle
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works out of the box with no required setup, automatically detecting Kotlin source sets from supported plugins like JVM, Multiplatform, and Android, as highlighted in the README's philosophy.
Integrates the ktlint engine directly with Gradle's incremental build and uses the Worker API for fast, parallelized linting and formatting, reducing build times significantly.
Compatible with Kotlin JVM, Multiplatform, and Android Gradle plugins, supporting .kt and .kts files across most Kotlin project types.
Automatically reads code style and linting rules from .editorconfig files when present, ensuring consistency with other tools without manual configuration.
Provides LintTask and FormatTask types for creating custom tasks, allowing granular control over source sets and generated code, as shown in the customizing tasks section.
Requires Gradle 8.4+ and ktlint 1.0+, forcing upgrades or causing incompatibility with older projects, and ktlint API changes can break compatibility, as noted in the configuration section.
For multi-module setups, the plugin must be applied in each module's build file, adding boilerplate code compared to single-plugin applications.
Pre-push hooks require applying the plugin to the root project and have issues with git worktree setups, limiting flexibility for some development workflows.
While reporters are configurable, the plugin relies on ktlint's built-in options, lacking native support for custom reporter formats or integrations without additional setup.