annotate metrics.gradle @ 214:0ca4f3c952b7

DEP-11: add depency-lock plugin and a resolver to supply dynamic version based on branch. Cleanup metrics includes
author smith@nwoca.org
date Mon, 27 Jun 2016 19:50:00 +0100
parents 45d2396e9fc8
children 47535c8358ce
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' }
134
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
7 maven { url 'http://repos.ssdt.nwoca.org/artifactory/repo' }
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
8 }
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
9 dependencies {
135
51e4ee02d47a update jaranalyzerplugin version
smith@nwoca.org
parents: 134
diff changeset
10 classpath 'me.davesmith:jaranalyzerplugin:0.2.0-SNAPSHOT'
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
11 }
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
12 }
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
13
134
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
14 apply plugin: me.davesmith.gradle.plugins.jaranalyzer.JarAnalyzerPlugin
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
15
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
16 jaranalyzer {
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
17 dot = true
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
18 packageFilter += 'org.slf4j*'
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
19 packageFilter += 'groovyx.*'
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
20 }
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
21
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
22 sonarRunner {
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
23 sonarProperties {
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
24 property "sonar.host.url", "http://sonar.ssdt-ohio.org/"
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
25 property "sonar.jdbc.url", ant.properties['sonar.jdbc.url']
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
26 property "sonar.jdbc.driverClassName", ant.properties['sonar.jdbc.driverClassName']
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
27 property "sonar.jdbc.username", ant.properties['sonar.jdbc.username']
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
28 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
29 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
30 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
31 }
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
32 }
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
33
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
34 subprojects {
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
35 afterEvaluate { project ->
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
36
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
37 def groovyProject = project.plugins.hasPlugin('groovy')
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
38 sonarRunner {
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
39 sonarProperties {
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
40 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
41 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
42 property "sonar.scm.url", "scm:hg:${gradle.hgRepositoryUrl}"
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
43 }
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
44 }
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
45 }
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
46 }
142
45d2396e9fc8 configure sonar to publish only for 'develop' builts.
Dave Smith <smith@nwoca.org>
parents: 135
diff changeset
47
45d2396e9fc8 configure sonar to publish only for 'develop' builts.
Dave Smith <smith@nwoca.org>
parents: 135
diff changeset
48 allprojects {
45d2396e9fc8 configure sonar to publish only for 'develop' builts.
Dave Smith <smith@nwoca.org>
parents: 135
diff changeset
49 afterEvaluate { project ->
45d2396e9fc8 configure sonar to publish only for 'develop' builts.
Dave Smith <smith@nwoca.org>
parents: 135
diff changeset
50 project.getTasksByName('sonarRunner',false).each { it.enabled = gradle.branchStream == 'develop' }
214
0ca4f3c952b7 DEP-11: add depency-lock plugin and a resolver to supply dynamic version based on branch. Cleanup metrics includes
smith@nwoca.org
parents: 142
diff changeset
51 }
142
45d2396e9fc8 configure sonar to publish only for 'develop' builts.
Dave Smith <smith@nwoca.org>
parents: 135
diff changeset
52 }