apps-android-commons/app/quality.gradle
2017-04-18 19:55:19 +09:00

45 lines
943 B
Groovy

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"
}
}
}