diff --git a/build.gradle b/build.gradle index b2759eb8ab6..852c63588b7 100644 --- a/build.gradle +++ b/build.gradle @@ -88,5 +88,13 @@ task ktlint(type: JavaExec, group: "verification") { description = "Check Kotlin code style." classpath = configurations.ktlint main = "com.pinterest.ktlint.Main" - args "**/*.kt" + args "app/**/*.kt", "!**/build", "buildSrc/**/*.kt" +} + + +task ktlintFormat(type: JavaExec, group: "formatting") { + description = "Fix Kotlin code style deviations." + classpath = configurations.ktlint + main = "com.pinterest.ktlint.Main" + args "-F", "app/**/*.kt", "!**/build", "buildSrc/**/*.kt" }