mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 18:47:03 +05:30
fix(build): inject test dependencies in the screenshotTest source set
This commit is contained in:
parent
1ebf610794
commit
d5a0bb256f
2 changed files with 4 additions and 1 deletions
|
@ -16,7 +16,7 @@ import org.gradle.kotlin.dsl.exclude
|
|||
/** Extension function to configure JUnit5 dependencies with the Truth assertion library. */
|
||||
fun DependencyHandlerScope.addTestDependencies(project: Project) {
|
||||
val libs = project.extensions.getByName("libs") as LibrariesForLibs
|
||||
arrayOf("test", "androidTest")
|
||||
arrayOf("test", "androidTest", "screenshotTest")
|
||||
.filter { sourceSet -> project.configurations.findByName("${sourceSet}Implementation") != null }
|
||||
.forEach { sourceSet ->
|
||||
addProvider("${sourceSet}Implementation", libs.junit.jupiter.api)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import com.android.build.api.variant.HasUnitTestBuilder
|
||||
import dev.msfjarvis.claw.gradle.addTestDependencies
|
||||
|
||||
plugins {
|
||||
id("dev.msfjarvis.claw.android-library")
|
||||
|
@ -64,4 +65,6 @@ dependencies {
|
|||
compileOnly(libs.androidx.compose.ui.tooling.preview)
|
||||
|
||||
runtimeOnly(libs.androidx.compose.ui.tooling)
|
||||
|
||||
addTestDependencies(project)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue