comparison metrics.gradle @ 118:f84f1d5465c1

update code coverage for sonar 3.3
author smith@nwoca.org
date Thu, 01 Nov 2012 21:18:20 +0100
parents 5e06e0629f85
children 740e905fce78
comparison
equal deleted inserted replaced
117:5e06e0629f85 118:f84f1d5465c1
32 dynamicAnalysis = "reuseReports" 32 dynamicAnalysis = "reuseReports"
33 sourceEncoding = "UTF-8" 33 sourceEncoding = "UTF-8"
34 } 34 }
35 withGlobalProperties { props -> 35 withGlobalProperties { props ->
36 props["sonar.language"] = "grvy" 36 props["sonar.language"] = "grvy"
37 props['sonar.core.codeCoveragePlugin'] = 'cobertura'
37 } 38 }
38 } 39 }
39 40
40 class SsdtSonarSettings extends BuildAdapter implements BuildListener { 41 class SsdtSonarSettings extends BuildAdapter implements BuildListener {
41 42
57 withProjectProperties { props -> 58 withProjectProperties { props ->
58 if (usesGroovy) { 59 if (usesGroovy) {
59 println "setting groovy profile on $p" 60 println "setting groovy profile on $p"
60 props['sonar.profile'] = 'SSDT Groovy Way' 61 props['sonar.profile'] = 'SSDT Groovy Way'
61 } 62 }
63 props['sonar.core.codeCoveragePlugin'] = 'cobertura'
62 props['sonar.cobertura.reportPath'] = "${reporting.baseDir}/cobertura/coverage.xml" 64 props['sonar.cobertura.reportPath'] = "${reporting.baseDir}/cobertura/coverage.xml"
63 props["sonar.cpd.skip"] = true 65 props["sonar.cpd.skip"] = true
64 props['sonar.language'] = usesGroovy ? 'grvy' : 'java' 66 props['sonar.language'] = usesGroovy ? 'grvy' : 'java'
65 } 67 }
66 } 68 }
87 project { 89 project {
88 language = usesGroovy ? 'groovy' : 'java' 90 language = usesGroovy ? 'groovy' : 'java'
89 dynamicAnalysis = "reuseReports" 91 dynamicAnalysis = "reuseReports"
90 sourceEncoding = "UTF-8" 92 sourceEncoding = "UTF-8"
91 withProjectProperties { props -> 93 withProjectProperties { props ->
94 props['sonar.core.codeCoveragePlugin'] = 'cobertura'
92 props['sonar.language'] = usesGroovy ? 'grvy' : 'java' 95 props['sonar.language'] = usesGroovy ? 'grvy' : 'java'
93 } 96 }
94 } 97 }
95 } 98 }
96 99