comparison metrics.gradle @ 134:afafe40ae5a9

add jaranalyzer plugin
author smith@nwoca.org
date Mon, 17 Jun 2013 17:20:05 +0100
parents 0d8681ff046b
children 51e4ee02d47a
comparison
equal deleted inserted replaced
133:0d8681ff046b 134:afafe40ae5a9
9 9
10 println "metrics: coverage enabled: ${gradle.environment.coverage}" 10 println "metrics: coverage enabled: ${gradle.environment.coverage}"
11 buildscript { 11 buildscript {
12 repositories { 12 repositories {
13 maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' } 13 maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' }
14 maven { url 'http://repos.ssdt.nwoca.org/artifactory/repository' } 14 maven { url 'http://repos.ssdt.nwoca.org/artifactory/repo' }
15 maven { url 'http://repos.ssdt.nwoca.org/artifactory/libs-snapshots' } 15 }
16 dependencies {
17 classpath 'me.davesmith:jaranalyzerplugin:0.1.0-SNAPSHOT'
16 } 18 }
17 } 19 }
20
21
22 apply plugin: me.davesmith.gradle.plugins.jaranalyzer.JarAnalyzerPlugin
23
24 jaranalyzer {
25 dot = true
26 packageFilter += 'org.slf4j*'
27 packageFilter += 'groovyx.*'
28 }
29
18 30
19 sonarRunner { 31 sonarRunner {
20 sonarProperties { 32 sonarProperties {
21 property "sonar.host.url", "http://sonar.ssdt-ohio.org/" 33 property "sonar.host.url", "http://sonar.ssdt-ohio.org/"
22 property "sonar.jdbc.url", ant.properties['sonar.jdbc.url'] 34 property "sonar.jdbc.url", ant.properties['sonar.jdbc.url']
37 jacocoAntRoot 'org.jacoco:org.jacoco.ant:0.6.2.201302030002' 49 jacocoAntRoot 'org.jacoco:org.jacoco.ant:0.6.2.201302030002'
38 } 50 }
39 51
40 task fullCoverageReport << { 52 task fullCoverageReport << {
41 ant { 53 ant {
42 taskdef(name:'jacocoreport', classname: 'org.jacoco.ant.ReportTask', classpath: configurations.jacocoAntRoot.asPath) 54 taskdef(name: 'jacocoreport', classname: 'org.jacoco.ant.ReportTask', classpath: configurations.jacocoAntRoot.asPath)
43 55
44 mkdir dir: "${buildDir.path}/reports/coverage" 56 mkdir dir: "${buildDir.path}/reports/coverage"
45 57
46 jacocoreport { 58 jacocoreport {
47 executiondata { 59 executiondata {
64 } 76 }
65 } 77 }
66 } 78 }
67 } 79 }
68 80
69 xml destfile: "${buildDir.path}/reports/coverage/jacoco.xml" 81 xml destfile: "${buildDir.path}/reports/coverage/jacoco.xml"
70 html destdir: "${buildDir.path}/reports/coverage" 82 html destdir: "${buildDir.path}/reports/coverage"
71 } 83 }
72 } 84 }
73 } 85 }
74 86
75 fullCoverageReport.dependsOn { 87 fullCoverageReport.dependsOn {