comparison metrics.gradle @ 133:0d8681ff046b

CM-133: fix sonar runner when coverage disabled
author smith@nwoca.org
date Thu, 06 Jun 2013 20:42:46 +0100
parents 8a7c3673dee9
children afafe40ae5a9
comparison
equal deleted inserted replaced
132:8a7c3673dee9 133:0d8681ff046b
5 gradle.environment.put('coverage', false) 5 gradle.environment.put('coverage', false)
6 } else { 6 } else {
7 gradle.environment.put('coverage', gradle.environment.coverage.toBoolean()) 7 gradle.environment.put('coverage', gradle.environment.coverage.toBoolean())
8 } 8 }
9 9
10 println "metrics: coverage enabled: ${gradle.environment.coverage}"
10 buildscript { 11 buildscript {
11 repositories { 12 repositories {
12 maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' } 13 maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' }
13 maven { url 'http://repos.ssdt.nwoca.org/artifactory/repository' } 14 maven { url 'http://repos.ssdt.nwoca.org/artifactory/repository' }
14 maven { url 'http://repos.ssdt.nwoca.org/artifactory/libs-snapshots' } 15 maven { url 'http://repos.ssdt.nwoca.org/artifactory/libs-snapshots' }
124 } 125 }
125 126
126 sonarRunner { 127 sonarRunner {
127 sonarProperties { 128 sonarProperties {
128 property "sonar.language", groovyProject ? 'grvy' : 'java' 129 property "sonar.language", groovyProject ? 'grvy' : 'java'
129 property "sonar.java.coveragePlugin", "jacoco" 130 if (gradle.environment.coverage) {
130 property "sonar.jacoco.reportPath", project.test.jacoco.destPath 131 property "sonar.java.coveragePlugin", "jacoco"
132 property "sonar.jacoco.reportPath", project.test.jacoco.destPath
133 }
131 property "sonar.build-stability.url", "http://bamboo.ssdt-ohio.org/browse/${gradle.bambooPlan}" 134 property "sonar.build-stability.url", "http://bamboo.ssdt-ohio.org/browse/${gradle.bambooPlan}"
132 property "sonar.scm.url", "scm:hg:${gradle.hgRepositoryUrl}" 135 property "sonar.scm.url", "scm:hg:${gradle.hgRepositoryUrl}"
133 } 136 }
134 } 137 }
135 } 138 }