apply plugin: 'checkstyle' apply plugin: 'pmd' check.dependsOn 'checkstyle', 'pmd' checkstyle { toolVersion = '7.5.1' } task checkstyle(type: Checkstyle) { configFile file("${project.rootDir}/script/style/checkstyle.xml") source 'src' include '**/*.java' exclude '**/gen/**' classpath = files() reports { html { enabled true destination "${project.buildDir}/reports/checkstyle/checkstyle.html" } } } task pmd(type: Pmd) { ignoreFailures = true ruleSetFiles = files("${project.rootDir}/script/style/ruleset.xml") ruleSets = [] source 'src' include '**/*.java' exclude '**/gen/**' reports { xml.enabled = false html.enabled = true xml { destination "${project.buildDir}/reports/pmd/pmd.xml" } html { destination "${project.buildDir}/reports/pmd/pmd.html" } } }