File tree Expand file tree Collapse file tree 5 files changed +20
-22
lines changed
src/main/groovy/com/github/maiflai Expand file tree Collapse file tree 5 files changed +20
-22
lines changed Original file line number Diff line number Diff line change 1+ build
2+ .gradle
3+
4+ * .iml
5+ * .ipr
6+ * .iws
7+ * .idea
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ apply plugin: 'idea'
1111apply plugin : ' maven'
1212apply plugin : ' signing'
1313apply plugin : ' groovy'
14- apply plugin : ' release'
14+ // apply plugin: 'release'
1515
1616group ' com.github.maiflai'
1717
@@ -36,11 +36,11 @@ artifacts {
3636 archives sourcesJar
3737}
3838
39- signing {
39+ /* signing {
4040 sign configurations.archives
41- }
41+ }*/
4242
43- uploadArchives {
43+ /* uploadArchives {
4444 repositories {
4545 mavenDeployer {
4646 beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
@@ -80,4 +80,4 @@ uploadArchives {
8080 }
8181 }
8282 }
83- }
83+ }*/
Original file line number Diff line number Diff line change @@ -8,22 +8,19 @@ import org.gradle.api.tasks.TaskAction
88 * Throws a GradleException if overall line coverage dips below the configured percentage.
99 */
1010class OverallCheckTask extends DefaultTask {
11-
1211 File cobertura
1312 double minimumLineRate = 1
1413
1514 @TaskAction
1615 void requireLineCoverage () {
17-
1816 def reportDirName = project. extensions[ScctPlugin . CONFIGURATION_NAME ]. reportDirName
19- if (cobertura == null ){
20- cobertura = project. file(" $project . buildDir /reports/$reportDirName /cobertura.xml" )
21- }
17+
18+ if (cobertura == null ) cobertura = project. file(" $project . buildDir /reports/$reportDirName /cobertura.xml" )
2219
2320 def xml = new XmlParser (). parse(cobertura)
2421 def overallLineRate = xml. attribute(' line-rate' ). toDouble()
2522 def difference = (minimumLineRate - overallLineRate)
23+
2624 if (difference > 0.001 ) throw new GradleException (" Line coverage of $overallLineRate is below $minimumLineRate by $difference " )
2725 }
28-
29- }
26+ }
Original file line number Diff line number Diff line change 11package com.github.maiflai
22
33import org.gradle.api.Action
4- import org.gradle.api.Plugin
54import org.gradle.api.Project
6- import org.gradle.api.Task
75import org.gradle.api.plugins.JavaPlugin
86import org.gradle.api.plugins.scala.ScalaPlugin
97import org.gradle.api.tasks.SourceSet
@@ -64,6 +62,8 @@ class ScctExtension {
6462 }
6563 t. tasks[ScctPlugin . TEST_NAME ]. configure {
6664 systemProperty ' scct.report.dir' , " ${ t.buildDir} /reports/${ t.extensions[ScctPlugin.CONFIGURATION_NAME].reportDirName} "
65+ systemProperty ' scct.basedir' , " ${ t.rootDir.absolutePath} " // for multi-module checking
66+
6767 def existingClasspath = classpath
6868 classpath = t. files(t. sourceSets[ScctPlugin . CONFIGURATION_NAME ]. output. classesDir) +
6969 project. configurations[ScctPlugin . CONFIGURATION_NAME ] +
@@ -73,8 +73,4 @@ class ScctExtension {
7373 }
7474
7575 String reportDirName = ' scct'
76-
77-
78- }
79-
80-
76+ }
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import org.gradle.api.Plugin
44import org.gradle.api.Project
55
66class ScctPlugin implements Plugin<Project > {
7-
87 static String CONFIGURATION_NAME = ' scct'
98
109 static String TEST_NAME = ' testScct'
@@ -17,5 +16,4 @@ class ScctPlugin implements Plugin<Project> {
1716 t. extensions. create(CONFIGURATION_NAME , ScctExtension , t)
1817 }
1918 }
20-
21- }
19+ }
You can’t perform that action at this time.
0 commit comments