Created
August 21, 2019 20:51
-
-
Save amadeu01/94ee11f926a47a9de61fd33fbf0c5769 to your computer and use it in GitHub Desktop.
Set ktlint with html reporter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task ktlint(type: JavaExec, group: "verification") { | |
description = "Check Kotlin code style." | |
main = "com.pinterest.ktlint.Main" | |
classpath = configurations.ktlint | |
args "src/**/*.kt --reporter=html,artifact=me.cassiano:ktlint-html-reporter:0.2.3,output=${buildDir}/ktlint.html" | |
} | |
check.dependsOn ktlint | |
task ktlintFormat(type: JavaExec, group: "formatting") { | |
description = "Fix Kotlin code style deviations." | |
main = "com.pinterest.ktlint.Main" | |
classpath = configurations.ktlint | |
args "-F", "src/**/*.kt" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment