Skip to content

Instantly share code, notes, and snippets.

@kalaiselvan369
Created April 17, 2020 11:20
Show Gist options
  • Save kalaiselvan369/83fa51f93b88572de9daa9efc4f5e53b to your computer and use it in GitHub Desktop.
Save kalaiselvan369/83fa51f93b88572de9daa9efc4f5e53b to your computer and use it in GitHub Desktop.
Gradle file for spotless plugin
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
kotlin {
target '**/*.kt'
ktlint("0.36.0")
//ktlint("0.36.0").userData(['disabled_rules': 'no-wildcard-imports'])
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
@marlonlom
Copy link

How can i import this file inside the root build.gradle (?)

@kalaiselvan369
Copy link
Author

In your app/buid.gradle or any other module level gradle, you can import as this

apply from: "$rootDir/spotless.gradle"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment