apply plugin: 'checkstyle' | |
checkstyle { | |
configFile rootProject.file('checkstyle.xml') | |
ignoreFailures false | |
showViolations true | |
} | |
task checkstyle(type: Checkstyle) { | |
configFile rootProject.file('checkstyle.xml') | |
source 'src/main/java' | |
ignoreFailures false | |
showViolations true | |
include '**/*.java' | |
classpath = files() | |
} | |
afterEvaluate { | |
if (project.tasks.getByName("check")) { | |
check.dependsOn('checkstyle') | |
} | |
} |