apply plugin: "com.diffplug.spotless" spotless { // if you are using build.gradle.kts, instead of 'spotless {' use: // configure { kotlin { // by default the target is every '.kt' and '.kts` file in the java sourcesets ktfmt() // has its own section below ktlint() // has its own section below diktat() // has its own section below prettier() // has its own section below licenseHeader '/* (C)$YEAR */' // or licenseHeaderFile } kotlinGradle { target '*.gradle.kts' // default target for kotlinGradle ktlint() // or ktfmt() or prettier() } } //spotless { // java { // target '**/*.java' // googleJavaFormat().aosp() // removeUnusedImports() // trimTrailingWhitespace() // indentWithSpaces() // endWithNewline() // } kotlin { // target '**/*.kt' // ktlint() // trimTrailingWhitespace() // indentWithSpaces() // endWithNewline() // } format 'misc', { // target '**/*.gradle', '**/*.md', '**/.gitignore' // indentWithSpaces() // trimTrailingWhitespace() // endWithNewline() // } // // format 'xml', { // target '**/*.xml' // indentWithSpaces() // trimTrailingWhitespace() // endWithNewline() // } //}