summaryrefslogtreecommitdiff
path: root/build-logic/kotlin-plugins/src/main
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-12-07 14:48:08 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-12-07 14:48:08 +0530
commit09a10678de532e8a499cbdf9d4f97ab0fd6fdd1a (patch)
tree692707b3a833c173ec6a1318c42de73fe097efe0 /build-logic/kotlin-plugins/src/main
parentd72f3b85c4d2766d83b14f7425bfcce553ffe8b2 (diff)
build: add kotlinx-kover for library code coverage
Diffstat (limited to 'build-logic/kotlin-plugins/src/main')
-rw-r--r--build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts9
1 files changed, 8 insertions, 1 deletions
diff --git a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts
index 516f5e4f..d8e88bf5 100644
--- a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts
+++ b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts
@@ -6,7 +6,10 @@
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
-plugins { id("com.github.android-password-store.kotlin-common") }
+plugins {
+ id("com.github.android-password-store.kotlin-common")
+ id("org.jetbrains.kotlinx.kover")
+}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
@@ -15,3 +18,7 @@ tasks.withType<KotlinCompile>().configureEach {
}
}
}
+
+tasks.koverCollectReports {
+ outputDir.set(rootProject.layout.buildDirectory.dir("coverage-reports"))
+}