Skip to content

Commit

Permalink
ci: configure code cov plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Feb 14, 2025
1 parent a75e50c commit 0c8e31f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
id("com.android.library") apply false
alias(libs.plugins.nexus.publish)
alias(libs.plugins.dokka)
alias(libs.plugins.kover)
}

group = "io.embrace"
Expand Down
1 change: 0 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies {
implementation(libs.agp)
implementation(libs.detekt.gradle.plugin)
implementation(libs.binary.compatibility.validator)
implementation(libs.kover.gradle.plugin)
}

gradlePlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ fun Project.configureProductionModule(
add("androidTestImplementation", findLibrary("androidx.test.core"))
add("androidTestImplementation", findLibrary("androidx.test.runner"))
add("androidTestUtil", findLibrary("androidx.test.orchestrator"))

add("kover", project)
}

project.afterEvaluate {
Expand Down
19 changes: 19 additions & 0 deletions embrace-android-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import io.embrace.internal.EmbraceBuildLogicExtension

plugins {
id("com.android.library")
id("kotlin-android")
Expand Down Expand Up @@ -43,6 +45,23 @@ kover {
}
}

val codeCoverageModules = listOf( // FIXME: future: add gradle plugin to code coverage
":embrace-android-api",
":embrace-internal-api",
":embrace-android-sdk",
":embrace-android-core",
":embrace-android-infra",
":embrace-android-features",
":embrace-android-payload",
":embrace-android-delivery",
":embrace-android-okhttp3",
":embrace-android-fcm",
":embrace-android-compose",
)
codeCoverageModules.forEach { projectName ->
dependencies.add("kover", project(projectName))
}

dependencies {
api(project(":embrace-android-api"))
implementation(project(":embrace-android-infra"))
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ binary-compatibility-validator = { module = "org.jetbrains.kotlinx:binary-compat
detekt-gradle-plugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detektGradlePlugin" }
agp = { module = "com.android.tools.build:gradle", version.ref = "agp" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinGradlePlugin" }
kover-gradle-plugin = { module = "org.jetbrains.kotlinx:kover-gradle-plugin", version.ref = "koverGradlePlugin" }
lifecycle-runtime = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" }
lifecycle-compiler = { group = "androidx.lifecycle", name = "lifecycle-compiler", version.ref = "lifecycle" }
lifecycle-process = { group = "androidx.lifecycle", name = "lifecycle-process", version.ref = "lifecycle" }
Expand Down Expand Up @@ -93,3 +92,4 @@ dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "koverGradlePlugin" }

0 comments on commit 0c8e31f

Please sign in to comment.