Search Gradle plugins

org.jlleitschuh.gradle.ktlint

Provides a convenient wrapper plugin over the ktlint project.

https://github.com/JLLeitschuh/ktlint-gradle

Using the plugins DSL:

plugins {
  id "org.jlleitschuh.gradle.ktlint" version "8.2.0"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "org.jlleitschuh.gradle:ktlint-gradle:8.2.0"
  }
}

apply plugin: "org.jlleitschuh.gradle.ktlint"

Using the plugins DSL:

plugins {
  id("org.jlleitschuh.gradle.ktlint") version "8.2.0"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("org.jlleitschuh.gradle:ktlint-gradle:8.2.0")
  }
}

apply(plugin = "org.jlleitschuh.gradle.ktlint")

Learn how to apply plugins to subprojects