Skip to content

Module code-formatter

A custom plugin for code formatting which uses ktfmt and Spotless under the hood

Download from MavenCentral

// buildSrc/build.gradle.kts

dependencies {
    implementation("com.javiersc.gradle-plugins:code-formatter:$version")
}

Apply

In the root build.gradle.kts

plugins {
    `javiersc-code-formatter`
}

Usage

Completely configured, and it adds automatically the ktfmt.xml config used by the IDEA plugin, so the IDEA plugin is enabled by default.