blob: 0ce47f78b170a79d554a7e045ba3c87d357ecc1c [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 Liuc4e96c72022-05-19 03:03:07 +08008 spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0'
D. Can Celasun76fa8c92019-10-18 15:15:45 +01009}
Alex Volanis7004a612018-01-24 10:30:13 -050010
Jiayu Liu649dcfd2022-02-21 23:18:50 +080011// see https://spotbugs-gradle-plugin.netlify.app/com/github/spotbugs/snom/spotbugsextension
12spotbugs {
Alex Volanis7004a612018-01-24 10:30:13 -050013 ignoreFailures = true
Jiayu Liu649dcfd2022-02-21 23:18:50 +080014 toolVersion = '4.5.3'
Alex Volanis7004a612018-01-24 10:30:13 -050015 effort = 'max'
16 reportLevel = 'low'
17 excludeFilter = file('code_quality_tools/findbugs-filter.xml')
18}
19
Jiayu Liu649dcfd2022-02-21 23:18:50 +080020// see https://spotbugs-gradle-plugin.netlify.app/com/github/spotbugs/snom/spotbugstask
21spotbugsMain {
Alex Volanis7004a612018-01-24 10:30:13 -050022 reports {
23 text.enabled = false
24 html.enabled = true
25 xml.enabled = false
26 }
27}
28
Alex Volanis7004a612018-01-24 10:30:13 -050029pmd {
30 ignoreFailures = true
31 toolVersion = '6.0.0'
32 sourceSets = [ sourceSets.main ]
Alex Volanis7004a612018-01-24 10:30:13 -050033 ruleSets = [ 'java-basic' ]
34}
35
36tasks.withType(Pmd) {
37 reports {
Jiayu Liu5b158382022-05-12 00:20:37 +080038 html.required = true
39 xml.required = false
Alex Volanis7004a612018-01-24 10:30:13 -050040 }
41}
Jiayu Liu53ec0822022-05-06 12:56:42 +080042
43spotless {
44 java {
Jiayu Liuc4e96c72022-05-19 03:03:07 +080045 target 'src/**/*.java'
Jiayu Liu53ec0822022-05-06 12:56:42 +080046 googleJavaFormat()
47 }
48}