Skip to content

Commit

Permalink
[#9] Setup Kover (#18)
Browse files Browse the repository at this point in the history
* [#13] Reorganis TOML, gradle files and gradle properties

* [#9] Setup Kover

* [#9] Setup Kover

* [#9] Setup Kover

* [#9] Setup Kover
  • Loading branch information
mustafaozhan authored Nov 3, 2023
1 parent d993341 commit 32cd518
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ jobs:
- name: Run Quality Jobs
uses: gradle/[email protected]
with:
arguments: check
arguments: check koverMergedXmlReport --parallel

- name: Upload Coverage Report
uses: actions/[email protected]
with:
name: coverageReport
path: build/reports/kover/merged/xml/report.xml

- name: Cancel other jobs if this fails
if: failure()
Expand Down
17 changes: 17 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
alias(kotlinMultiplatform).apply(false)
alias(compose).apply(false)
alias(androidApplication).apply(false)
alias(libs.plugins.kover)
}
}

Expand All @@ -15,5 +16,21 @@ buildscript {
}

allprojects {
apply(plugin = rootProject.libs.plugins.kover.get().pluginId).also {
koverMerged {
filters {
annotations {
excludes += listOf(
"androidx.compose.ui.tooling.preview.Preview",
"androidx.compose.runtime.Composable"
)
}
}
enable()
}
}

// todo CMP bug needs to be removed when fixed
// https://youtrack.jetbrains.com/issue/KT-41821/Kotlin-1.4.10-ios-target-java.lang.IllegalStateException-failed-to-resolve-Kotlin-library-org.jetbrains.kotlinx-atomicfu-common
apply(plugin = rootProject.libs.plugins.atomicfu.get().pluginId)
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ compose = "1.5.1"
composeActivity = "1.7.2"
appcompat = "1.6.1"
atomicfu = "0.17.3"
kover = "0.6.1"

[libraries]

Expand All @@ -22,3 +23,4 @@ kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref =
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
androidApplication = { id = "com.android.application", version.ref = "androidGradlePlugin" }
atomicfu = { id = "kotlinx-atomicfu" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }

0 comments on commit 32cd518

Please sign in to comment.