Mercurial > public > develkit
annotate metrics.gradle @ 129:bef2bfc61f6e
CM-133: fix bamboo plan parsing. enable showEnv to display sytem properties and env variables in -info mode
author | smith@nwoca.org |
---|---|
date | Wed, 05 Jun 2013 02:29:48 +0100 |
parents | c93df17513f1 |
children | 253374129034 |
rev | line source |
---|---|
126 | 1 apply plugin: "sonar-runner" |
85 | 2 ant.property(file: System.getProperty('user.home') + "/.ssdt/sonar.properties") |
3 | |
4 buildscript { | |
128
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
5 repositories { |
85 | 6 maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' } |
116 | 7 maven { url 'http://repos.ssdt.nwoca.org/artifactory/repository' } |
8 maven { url 'http://repos.ssdt.nwoca.org/artifactory/libs-snapshots' } | |
128
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
9 } |
85 | 10 dependencies { |
116 | 11 classpath "me.davesmith:gradle-cobertura-plugin:1.0.2.SNAPSHOT" |
12 classpath "net.sourceforge.cobertura:cobertura:1.9.4.1" | |
85 | 13 } |
14 } | |
15 | |
126 | 16 sonarRunner { |
17 sonarProperties { | |
18 property "sonar.host.url", "http://sonar.ssdt-ohio.org/" | |
19 property "sonar.jdbc.url", ant.properties['sonar.jdbc.url'] | |
20 property "sonar.jdbc.driverClassName", ant.properties['sonar.jdbc.driverClassName'] | |
21 property "sonar.jdbc.username", ant.properties['sonar.jdbc.username'] | |
22 property "sonar.jdbc.password", ant.properties['sonar.jdbc.password'] | |
128
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
23 property "sonar.build-stability.url", "http://bamboo.ssdt-ohio.org/browse/${gradle.bambooPlan}" |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
24 property "sonar.scm.url", "scm:hg:${gradle.hgRepositoryUrl}" |
117
5e06e0629f85
correct groovy language setting and force profile name
smith@nwoca.org
parents:
116
diff
changeset
|
25 } |
85 | 26 } |
126 | 27 |
128
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
28 subprojects { |
126 | 29 afterEvaluate { project -> |
85 | 30 |
126 | 31 def groovyProject = project.plugins.hasPlugin('groovy') |
128
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
32 def javaProject = project.plugins.hasPlugin('java') |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
33 |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
34 if (groovyProject || javaProject) { |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
35 project.apply plugin: 'jacoco' |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
36 |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
37 project.jacocoTestReport { |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
38 if (groovyProject) { |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
39 sourceDirectories = files(sourceSets.main.allGroovy.srcDirs) |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
40 classDirectories = files(project.sourceSets.main.output.classesDir) |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
41 } |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
42 reports { |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
43 xml.enabled true |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
44 csv.enabled false |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
45 html.enabled true |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
46 } |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
47 } |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
48 |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
49 task coverageReport { |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
50 dependsOn jacocoTestReport |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
51 } |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
52 |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
53 } |
126 | 54 |
55 sonarRunner { | |
56 sonarProperties { | |
57 property "sonar.language", groovyProject ? 'grvy' : 'java' | |
128
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
58 property "sonar.java.coveragePlugin", "jacoco" |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
59 property "sonar.jacoco.reportPath", project.test.jacoco.destPath |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
60 property "sonar.build-stability.url", "http://bamboo.ssdt-ohio.org/browse/${gradle.bambooPlan}" |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
61 property "sonar.scm.url", "scm:hg:${gradle.hgRepositoryUrl}" |
85 | 62 } |
63 } | |
64 } | |
126 | 65 } |