Last active
May 14, 2017 07:38
-
-
Save amitkma/80c903dabc98d2f69d2555bd4ec9d6b4 to your computer and use it in GitHub Desktop.
style-script.gradle for medium article.
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
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