File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/main/groovy/org/scoverage Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33distributionPath =wrapper/dists
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
6- distributionUrl =http\://services.gradle.org/distributions/gradle-1.12 -bin.zip
6+ distributionUrl =http\://services.gradle.org/distributions/gradle-2.0 -bin.zip
Original file line number Diff line number Diff line change @@ -11,13 +11,21 @@ class OverallCheckTask extends DefaultTask {
1111 File cobertura
1212 double minimumLineRate = 0.75
1313
14+ protected XmlParser parser;
15+
16+ OverallCheckTask () {
17+ parser = new XmlParser ()
18+ parser. setFeature(' http://apache.org/xml/features/disallow-doctype-decl' , false )
19+ parser. setFeature(' http://apache.org/xml/features/nonvalidating/load-external-dtd' , false )
20+ }
21+
1422 @TaskAction
1523 void requireLineCoverage () {
1624 def extension = ScoveragePlugin . extensionIn(project)
1725
1826 if (cobertura == null ) cobertura = new File (extension. reportDir, ' cobertura.xml' )
1927
20- def xml = new XmlParser () . parse(cobertura)
28+ def xml = parser . parse(cobertura)
2129 def overallLineRate = xml. attribute(' line-rate' ). toDouble()
2230 def difference = (minimumLineRate - overallLineRate)
2331
You can’t perform that action at this time.
0 commit comments