Skip to content

Commit 8ed163c

Browse files
authored
Configure coverage through common convention plugins (#6018)
1 parent dad76c7 commit 8ed163c

4 files changed

Lines changed: 23 additions & 165 deletions

File tree

build.gradle.kts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ plugins {
2727
alias(libs.plugins.detekt) apply false
2828
alias(libs.plugins.shot) apply false
2929
alias(libs.plugins.androidx.navigation) apply false
30-
alias(libs.plugins.sonarqube) apply false
31-
alias(libs.plugins.kover) apply false
3230
id("io.getstream.chat.ReleasePlugin")
3331
id("io.getstream.chat.ChangelogReleaseSectionPlugin")
3432
alias(libs.plugins.gitversioner)
@@ -41,6 +39,28 @@ streamProject {
4139
spotless {
4240
ignoredModules = setOf("stream-chat-android-docs")
4341
}
42+
43+
coverage {
44+
includedModules = setOf(
45+
"stream-chat-android-client",
46+
"stream-chat-android-compose",
47+
"stream-chat-android-core",
48+
"stream-chat-android-markdown-transformer",
49+
"stream-chat-android-offline",
50+
"stream-chat-android-state",
51+
"stream-chat-android-ui-common",
52+
"stream-chat-android-ui-utils",
53+
)
54+
}
55+
}
56+
57+
afterEvaluate {
58+
tasks.named("testCoverage") {
59+
// Run Paparazzi tests of the UI Components module but do not include its coverage in the report
60+
// until we can update Paparazzi and Kover libraries alongside Kotlin and Compose.
61+
// See https://linear.app/stream/issue/AND-819/update-paparazzi-and-kover-libraries
62+
dependsOn("stream-chat-android-ui-components:verifyPaparazziDebug")
63+
}
4464
}
4565

4666
buildscript {
@@ -54,8 +74,6 @@ buildscript {
5474
}
5575

5676
apply(from = "${rootDir}/scripts/sample-app-versioner.gradle")
57-
apply(from = "${rootDir}/scripts/sonar.gradle")
58-
apply(from = "${rootDir}/scripts/coverage.gradle")
5977

6078
subprojects {
6179
// Configure Android projects with common SDK versions as soon as either plugin is applied

gradle/libs.versions.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ room = "2.6.1"
7979
shimmer = "0.5.0"
8080
shimmerCompose = "1.3.1"
8181
shot = "6.1.0"
82-
sonarqube = "6.0.1.5171"
83-
streamConventions = "0.3.0"
82+
streamConventions = "0.4.0"
8483
streamLog = "1.3.2"
8584
streamPush = "1.3.1"
8685
streamResult = "1.3.2"
@@ -90,7 +89,6 @@ timber = "5.0.1"
9089
turbine = "1.2.0"
9190
work = "2.9.1"
9291
playServicesLocation = "21.3.0"
93-
kover = "0.9.2"
9492
mavenPublish = "0.34.0"
9593

9694
[libraries]
@@ -246,10 +244,8 @@ kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "ko
246244
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp"}
247245
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish"}
248246
shot = { id = "shot", version.ref = "shot"}
249-
sonarqube = { id = "org.sonarqube", version.ref = "sonarqube"}
250247
stream-project = { id = "io.getstream.project", version.ref = "streamConventions" }
251248
stream-android-library = { id = "io.getstream.android.library", version.ref = "streamConventions" }
252249
stream-android-application = { id = "io.getstream.android.application", version.ref = "streamConventions" }
253250
stream-java-library = { id = "io.getstream.java.library", version.ref = "streamConventions" }
254251
paparazzi = { id = "app.cash.paparazzi", version.ref = "paparazzi"}
255-
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover"}

scripts/coverage.gradle

Lines changed: 0 additions & 131 deletions
This file was deleted.

scripts/sonar.gradle

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)