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
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =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 {
11
11
File cobertura
12
12
double minimumLineRate = 0.75
13
13
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
+
14
22
@TaskAction
15
23
void requireLineCoverage () {
16
24
def extension = ScoveragePlugin . extensionIn(project)
17
25
18
26
if (cobertura == null ) cobertura = new File (extension. reportDir, ' cobertura.xml' )
19
27
20
- def xml = new XmlParser () . parse(cobertura)
28
+ def xml = parser . parse(cobertura)
21
29
def overallLineRate = xml. attribute(' line-rate' ). toDouble()
22
30
def difference = (minimumLineRate - overallLineRate)
23
31
You can’t perform that action at this time.
0 commit comments