From 09a10678de532e8a499cbdf9d4f97ab0fd6fdd1a Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 7 Dec 2021 14:48:08 +0530 Subject: build: add kotlinx-kover for library code coverage --- .../com.github.android-password-store.kotlin-library.gradle.kts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'build-logic/kotlin-plugins/src') 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().configureEach { kotlinOptions { @@ -15,3 +18,7 @@ tasks.withType().configureEach { } } } + +tasks.koverCollectReports { + outputDir.set(rootProject.layout.buildDirectory.dir("coverage-reports")) +} -- cgit v1.2.3