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
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
1 apply plugin: "sonar-runner"
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
2 ant.property(file: System.getProperty('user.home') + "/.ssdt/sonar.properties")
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
3
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
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
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
6 maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' }
116
8f3ba3b811bf update cobertura configuration
smith@nwoca.org
parents: 108
diff changeset
7 maven { url 'http://repos.ssdt.nwoca.org/artifactory/repository' }
8f3ba3b811bf update cobertura configuration
smith@nwoca.org
parents: 108
diff changeset
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
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
10 dependencies {
116
8f3ba3b811bf update cobertura configuration
smith@nwoca.org
parents: 108
diff changeset
11 classpath "me.davesmith:gradle-cobertura-plugin:1.0.2.SNAPSHOT"
8f3ba3b811bf update cobertura configuration
smith@nwoca.org
parents: 108
diff changeset
12 classpath "net.sourceforge.cobertura:cobertura:1.9.4.1"
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
13 }
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
14 }
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
15
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
16 sonarRunner {
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
17 sonarProperties {
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
18 property "sonar.host.url", "http://sonar.ssdt-ohio.org/"
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
19 property "sonar.jdbc.url", ant.properties['sonar.jdbc.url']
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
20 property "sonar.jdbc.driverClassName", ant.properties['sonar.jdbc.driverClassName']
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
21 property "sonar.jdbc.username", ant.properties['sonar.jdbc.username']
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
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
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
26 }
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
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
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
29 afterEvaluate { project ->
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
30
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
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
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
59
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
60 sonarRunner {
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
61 sonarProperties {
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
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
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
67 }
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
68 }
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
69 }
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
70 }