Skip to content

Commit d970117

Browse files
committed
Add coverage checks
1 parent 448b1ee commit d970117

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

build.gradle

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'signing'
33
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
4+
id 'jacoco'
45
}
56

67
apply plugin: 'java'
@@ -42,6 +43,7 @@ test {
4243
testLogging {
4344
events "passed", "skipped", "failed"
4445
}
46+
finalizedBy jacocoTestReport
4547
}
4648

4749
tasks.register('sourcesJar', Jar) {
@@ -92,6 +94,16 @@ def pomConfig = {
9294
}
9395
}
9496

97+
jacocoTestReport {
98+
dependsOn test
99+
reports {
100+
xml.required = true
101+
html.required = true
102+
}
103+
}
104+
105+
check.dependsOn jacocoTestReport
106+
95107
publishing {
96108
publications {
97109
mavenJava(MavenPublication) {
@@ -109,22 +121,6 @@ publishing {
109121
}
110122
}
111123
}
112-
113-
/* Keeping this as fallback in case of a failure within the nexus-publishing plugin
114-
repositories {
115-
maven {
116-
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
117-
if (version.toString().toLowerCase().endsWith("snapshot")) {
118-
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/" // For Snapshot testing
119-
}
120-
121-
credentials {
122-
username = System.getenv("SONATYPE_USER")
123-
password = System.getenv("SONATYPE_KEY")
124-
}
125-
}
126-
}
127-
*/
128124
}
129125
signing{
130126
def signingKeyId = System.getenv("SIGNING_KEY_ID")

0 commit comments

Comments
 (0)