@@ -8,74 +8,70 @@ plugins {
88 id(" jacoco-report-aggregation" ) apply false
99}
1010
11- subprojects {
12- if (! plugins.hasPlugin(" java" )) return @subprojects // only apply to projects have java plugin
11+ apply (plugin = " checkstyle" )
12+ apply (plugin = " pmd" )
13+ apply (plugin = " com.github.spotbugs" )
14+ apply (plugin = " jacoco" )
15+ apply (plugin = " jacoco-report-aggregation" )
1316
14- apply (plugin = " checkstyle" )
15- apply (plugin = " pmd" )
16- apply (plugin = " com.github.spotbugs" )
17- apply (plugin = " jacoco" )
18- apply (plugin = " jacoco-report-aggregation" )
19-
20- checkstyle {
21- dependencies {
22- checkstyle(" com.puppycrawl.tools:checkstyle:10.26.1" )
23- checkstyle(" com.github.sevntu-checkstyle:sevntu-checks:1.44.1" )
24- }
17+ checkstyle {
18+ dependencies {
19+ checkstyle(" com.puppycrawl.tools:checkstyle:10.26.1" )
20+ checkstyle(" com.github.sevntu-checkstyle:sevntu-checks:1.44.1" )
21+ }
2522
26- configFile = rootProject.file(" buildSrc/src/main/check/checkstyle.xml" )
27- configProperties[" configDir" ] = configFile.parentFile
23+ configFile = rootProject.file(" buildSrc/src/main/check/checkstyle.xml" )
24+ configProperties[" configDir" ] = configFile.parentFile
2825
29- tasks.named<Checkstyle >(" checkstyleMain" ) {
30- group = " verification"
31- source = fileTree(projectDir) {
32- include(" conf/**/*.properties" )
33- include(" src/main/java/**/*.java" )
34- include(" src/main/**/*.properties" )
35- }
26+ tasks.named<Checkstyle >(" checkstyleMain" ) {
27+ group = " verification"
28+ source = fileTree(projectDir) {
29+ include(" conf/**/*.properties" )
30+ include(" src/main/java/**/*.java" )
31+ include(" src/main/**/*.properties" )
3632 }
33+ }
3734
38- tasks.named<Checkstyle >(" checkstyleTest" ).configure {
39- group = " verification"
40- source = fileTree(projectDir) {
41- include(" src/test/java/**/*.java" ) // not include java files in resources
42- include(" src/test/**/*.properties" )
43- }
35+ tasks.named<Checkstyle >(" checkstyleTest" ).configure {
36+ group = " verification"
37+ source = fileTree(projectDir) {
38+ include(" src/test/java/**/*.java" ) // not include java files in resources
39+ include(" src/test/**/*.properties" )
4440 }
4541 }
42+ }
4643
47- pmd {
48- ruleSets = listOf ()
49- ruleSetFiles = rootProject.files(" buildSrc/src/main/check/pmd.xml" )
50- toolVersion = " 7.16.0"
51- isConsoleOutput = true
44+ pmd {
45+ ruleSets = listOf ()
46+ ruleSetFiles = rootProject.files(" buildSrc/src/main/check/pmd.xml" )
47+ toolVersion = " 7.16.0"
48+ isConsoleOutput = true
5249
53- tasks.withType<Pmd > {
54- group = " verification"
55- }
50+ tasks.withType<Pmd > {
51+ group = " verification"
5652 }
53+ }
5754
58- spotbugs {
59- dependencies {
60- spotbugsPlugins(" com.mebigfatguy.sb-contrib:sb-contrib:7.6.12" )
61- }
62-
63- toolVersion = " 4.9.3"
64- reportLevel = Confidence .LOW
65- extraArgs = listOf (" -longBugCodes" )
66- includeFilter = rootProject.file(" buildSrc/src/main/check/spotbugs.xml" )
55+ spotbugs {
56+ dependencies {
57+ spotbugsPlugins(" com.mebigfatguy.sb-contrib:sb-contrib:7.6.12" )
6758 }
6859
69- jacoco {
70- toolVersion = " 0.8.13"
60+ toolVersion = " 4.9.3"
61+ reportLevel = Confidence .LOW
62+ extraArgs = listOf (" -longBugCodes" )
63+ includeFilter = rootProject.file(" buildSrc/src/main/check/spotbugs.xml" )
64+ }
65+
66+ jacoco {
67+ toolVersion = " 0.8.13"
7168
72- tasks.named<JacocoReport >(" testCodeCoverageReport" ) {
73- reports {
74- xml.required = true
75- xml.outputLocation = layout.buildDirectory.file(" reports/jacoco/report.xml" ).get()
76- html.required = true
77- csv.required = false
78- }
69+ tasks.named<JacocoReport >(" testCodeCoverageReport" ) {
70+ reports {
71+ xml.required = true
72+ xml.outputLocation = layout.buildDirectory.file(" reports/jacoco/report.xml" ).get()
73+ html.required = true
74+ csv.required = false
7975 }
8076 }
8177}
0 commit comments