diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-12-07 14:48:08 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2021-12-07 14:48:08 +0530 |
commit | 09a10678de532e8a499cbdf9d4f97ab0fd6fdd1a (patch) | |
tree | 692707b3a833c173ec6a1318c42de73fe097efe0 /build-logic/kotlin-plugins | |
parent | d72f3b85c4d2766d83b14f7425bfcce553ffe8b2 (diff) |
build: add kotlinx-kover for library code coverage
Diffstat (limited to 'build-logic/kotlin-plugins')
-rw-r--r-- | build-logic/kotlin-plugins/build.gradle.kts | 1 | ||||
-rw-r--r-- | build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/build-logic/kotlin-plugins/build.gradle.kts b/build-logic/kotlin-plugins/build.gradle.kts index 0ce8e9de..d1c9a3af 100644 --- a/build-logic/kotlin-plugins/build.gradle.kts +++ b/build-logic/kotlin-plugins/build.gradle.kts @@ -11,6 +11,7 @@ plugins { dependencies { implementation(libs.build.agp) implementation(libs.build.binarycompat) + implementation(libs.build.kover) implementation(libs.build.kotlin) implementation(libs.build.spotless) } 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")) +} |