summaryrefslogtreecommitdiff
path: root/gradle
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2018-07-11 17:15:44 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2018-07-11 17:15:44 +0200
commit8c7e208233c86614ac29157efba24e3a57d7f21c (patch)
tree1fdcc1379406440a9a152f0ce0fa814f87af4694 /gradle
parentc5f88cc28f9d27f867247a713605368c558795a0 (diff)
chore: Add support for Jacoco
This change adds support for Jacoco in the build toolchain.
Diffstat (limited to 'gradle')
-rw-r--r--gradle/kotlin.gradle21
1 files changed, 21 insertions, 0 deletions
diff --git a/gradle/kotlin.gradle b/gradle/kotlin.gradle
index 7fd45326..04f67ae8 100644
--- a/gradle/kotlin.gradle
+++ b/gradle/kotlin.gradle
@@ -25,6 +25,7 @@
/* Default configuration for Kotlin projects */
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
+apply plugin: 'jacoco'
sourceCompatibility = 1.8
@@ -57,6 +58,26 @@ test {
reports {
html.enabled = true
}
+
+ finalizedBy jacocoTestReport
+}
+
+/* Coverage */
+repositories {
+ // This repository is needed to get the latest snapshot of Jacoco
+ maven { url = "https://oss.sonatype.org/content/repositories/snapshots" }
+}
+
+jacoco {
+ // We use the latest snapshot of Jacoco in order to get it to ignore Kotlin-generated code
+ toolVersion = jacoco_version
+}
+
+jacocoTestReport {
+ reports {
+ html.enabled = true
+ xml.enabled = true
+ }
}
/* Documentation generation */