Mercurial > public > develkit
annotate metrics.gradle @ 130:253374129034
CM-133: disable jacoco task. causing errors in some tests (java1.7?)
author | smith@nwoca.org |
---|---|
date | Wed, 05 Jun 2013 15:45:28 +0100 |
parents | c93df17513f1 |
children | ca34c067b178 |
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 |
130
253374129034
CM-133: disable jacoco task. causing errors in some tests (java1.7?)
smith@nwoca.org
parents:
128
diff
changeset
|
37 project.test { |
253374129034
CM-133: disable jacoco task. causing errors in some tests (java1.7?)
smith@nwoca.org
parents:
128
diff
changeset
|
38 jacoco { |
253374129034
CM-133: disable jacoco task. causing errors in some tests (java1.7?)
smith@nwoca.org
parents:
128
diff
changeset
|
39 enabled = false |
253374129034
CM-133: disable jacoco task. causing errors in some tests (java1.7?)
smith@nwoca.org
parents:
128
diff
changeset
|
40 } |
253374129034
CM-133: disable jacoco task. causing errors in some tests (java1.7?)
smith@nwoca.org
parents:
128
diff
changeset
|
41 } |
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
|
42 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
|
43 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
|
44 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
|
45 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
|
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 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
|
48 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
|
49 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
|
50 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
|
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 |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
54 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
|
55 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
|
56 } |
c93df17513f1
CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents:
126
diff
changeset
|
57 |
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 } |
126 | 59 |
60 sonarRunner { | |
61 sonarProperties { | |
62 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
|
63 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
|
64 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
|
65 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
|
66 property "sonar.scm.url", "scm:hg:${gradle.hgRepositoryUrl}" |
85 | 67 } |
68 } | |
69 } | |
126 | 70 } |