Skip to content

Commit c70ac78

Browse files
committed
Add JaCoCo Gradle plugin
Signed-off-by: Dmitry Sulman <[email protected]>
1 parent 6a4e612 commit c70ac78

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88
gradlePluginPortal()
99
}
1010

11-
val jreleaserFullRelease by tasks.existing {
11+
tasks.jreleaserFullRelease {
1212
subprojects.forEach {
1313
val copyStagingDeployToRoot by it.tasks.existing
1414
dependsOn(copyStagingDeployToRoot)

buildSrc/src/main/kotlin/conventions.gradle.kts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
`maven-publish`
66
id("org.jetbrains.dokka")
77
id("org.jetbrains.dokka-javadoc")
8+
jacoco
89
}
910

1011
group = "io.github.dmitrysulman"
@@ -31,6 +32,11 @@ java {
3132
withSourcesJar()
3233
}
3334

35+
tasks.build {
36+
dependsOn(tasks.test)
37+
dependsOn(tasks.jacocoTestReport)
38+
}
39+
3440
tasks.withType<Test>().configureEach {
3541
useJUnitPlatform()
3642
}
@@ -88,3 +94,11 @@ publishing {
8894
}
8995
}
9096
}
97+
98+
tasks.jacocoTestReport {
99+
dependsOn(tasks.test)
100+
reports {
101+
xml.required = true
102+
html.required = true
103+
}
104+
}

logback-access-reactor-netty/src/test/kotlin/io/github/dmitrysulman/logback/access/reactor/netty/AccessLogTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class AccessLogTests {
6666
val response = performGetRequest("/test")
6767
assertNotNull(response)
6868

69-
Thread.sleep(20)
69+
Thread.sleep(100)
7070
assertEquals(1, eventCaptureAppender.list.size)
7171
val accessEvent = eventCaptureAppender.list[0]
7272
assertAccessEvent(accessEvent, response)

0 commit comments

Comments
 (0)