diff metrics.gradle @ 117:5e06e0629f85

correct groovy language setting and force profile name
author smith@nwoca.org
date Thu, 01 Nov 2012 19:57:09 +0100
parents 8f3ba3b811bf
children f84f1d5465c1
line wrap: on
line diff
--- a/metrics.gradle	Thu Nov 01 15:45:40 2012 +0100
+++ b/metrics.gradle	Thu Nov 01 19:57:09 2012 +0100
@@ -32,6 +32,9 @@
         dynamicAnalysis = "reuseReports"     
         sourceEncoding = "UTF-8"                    
     }  
+    withGlobalProperties { props ->
+        props["sonar.language"] = "grvy"
+    }
 }
     
 class SsdtSonarSettings extends BuildAdapter implements BuildListener {
@@ -47,11 +50,15 @@
                         
             sonar {
                 project {
-                    language = usesGroovy ? 'grvy' : 'java'
+                    language = usesGroovy ? 'groovy' : 'java'
                     dynamicAnalysis = "reuseReports"     
                     sourceEncoding = "UTF-8"                    
                     coberturaReportPath = file("${reporting.baseDir}/cobertura/coverage.xml")                   
                     withProjectProperties { props ->
+                        if (usesGroovy) {
+                            println "setting groovy profile on $p"
+                            props['sonar.profile'] = 'SSDT Groovy Way'
+                        }
                         props['sonar.cobertura.reportPath'] = "${reporting.baseDir}/cobertura/coverage.xml"
                         props["sonar.cpd.skip"] = true
                         props['sonar.language'] = usesGroovy ? 'grvy' : 'java'
@@ -78,7 +85,7 @@
              
             sonar {
                 project {                            
-                    language = usesGroovy ? 'grvy' : 'java'
+                    language = usesGroovy ? 'groovy' : 'java'
                     dynamicAnalysis = "reuseReports"     
                     sourceEncoding = "UTF-8"
                     withProjectProperties { props ->