Skip to content

Instantly share code, notes, and snippets.

@amitkma
Last active May 14, 2017 07:38
Show Gist options
  • Save amitkma/80c903dabc98d2f69d2555bd4ec9d6b4 to your computer and use it in GitHub Desktop.
Save amitkma/80c903dabc98d2f69d2555bd4ec9d6b4 to your computer and use it in GitHub Desktop.
style-script.gradle for medium article.
apply plugin: 'checkstyle'
dependencies {
checkstyle 'com.puppycrawl.tools:checkstyle:7.7'
}
def checkstyleConfigDir = "$project.rootDir/config";
def reportsDir = "$project.buildDir/reports"
check.dependsOn 'checkstyle'
task checkstyle(type: Checkstyle, group: 'Verification') {
configFile file("$checkstyleConfigDir/checkstyle-config.xml")
source 'src'
include '**/*.java'
reports {
xml.enabled = true
html.enabled = true
xml {
destination "$reportsDir/checkstyle/checkstyle.xml"
}
html {
destination "$reportsDir/checkstyle/checkstyle.html"
}
}
classpath = files()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment