fix(build): inject test dependencies in the screenshotTest source set

This commit is contained in:
Harsh Shandilya 2024-09-02 12:49:17 +05:30
parent 1ebf610794
commit d5a0bb256f
2 changed files with 4 additions and 1 deletions

View file

@ -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)