blob: f633413cdbbdf7fe304b4dfedbfe9c8de6f3a1ca [file] [log] [blame]
Alex Volanis7004a612018-01-24 10:30:13 -05001
2// =================================================================
3// Configure the Gradle code quality plugins here.
4//
5
D. Can Celasun76fa8c92019-10-18 15:15:45 +01006dependencies {
7 spotbugs configurations.spotbugsPlugins.dependencies
Jiayu Liu649dcfd2022-02-21 23:18:50 +08008 spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
D. Can Celasun76fa8c92019-10-18 15:15:45 +01009}
Alex Volanis7004a612018-01-24 10:30:13 -050010
D. Can Celasun76fa8c92019-10-18 15:15:45 +010011apply plugin: 'com.github.spotbugs'
12
Jiayu Liu649dcfd2022-02-21 23:18:50 +080013// see https://spotbugs-gradle-plugin.netlify.app/com/github/spotbugs/snom/spotbugsextension
14spotbugs {
Alex Volanis7004a612018-01-24 10:30:13 -050015 ignoreFailures = true
Jiayu Liu649dcfd2022-02-21 23:18:50 +080016 toolVersion = '4.5.3'
Alex Volanis7004a612018-01-24 10:30:13 -050017 effort = 'max'
18 reportLevel = 'low'
19 excludeFilter = file('code_quality_tools/findbugs-filter.xml')
20}
21
Jiayu Liu649dcfd2022-02-21 23:18:50 +080022// see https://spotbugs-gradle-plugin.netlify.app/com/github/spotbugs/snom/spotbugstask
23spotbugsMain {
Alex Volanis7004a612018-01-24 10:30:13 -050024 reports {
25 text.enabled = false
26 html.enabled = true
27 xml.enabled = false
28 }
29}
30
31apply plugin: 'pmd'
32
33pmd {
34 ignoreFailures = true
35 toolVersion = '6.0.0'
36 sourceSets = [ sourceSets.main ]
Alex Volanis7004a612018-01-24 10:30:13 -050037 ruleSets = [ 'java-basic' ]
38}
39
40tasks.withType(Pmd) {
41 reports {
42 html.enabled = true
43 xml.enabled = false
44 }
45}
Jiayu Liu53ec0822022-05-06 12:56:42 +080046
47spotless {
48 java {
49 target project.fileTree(project.rootDir) {
50 include 'src/**/*.java'
51 }
52 googleJavaFormat()
53 }
54}