Search Gradle plugins

Add this plugin to your build using the plugins DSL:

plugins {
  id("com.diffplug.gradle.spotless") version "5.7.0"
}

See also:

  • The legacy method of plugin application.
    buildscript {
      repositories {
        gradlePluginPortal()
      }
      dependencies {
        classpath("com.diffplug.spotless:spotless-plugin-gradle:5.7.0")
      }
    }
    
    apply(plugin = "com.diffplug.gradle.spotless")
  • Applying plugins to all subprojects .