apps-android-commons/app/quality.gradle
2018-05-01 17:03:59 +05:30

45 lines
961 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 file("${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 file("${project.buildDir}/reports/pmd/pmd.xml")
}
html {
destination file("${project.buildDir}/reports/pmd/pmd.html")
}
}
}