Use DependencyHandlerScope.testCommonDependencies()
This commit is contained in:
parent
bc9ba9ae06
commit
a575019760
84 changed files with 187 additions and 569 deletions
|
|
@ -20,6 +20,7 @@ import org.gradle.kotlin.dsl.project
|
|||
|
||||
private fun DependencyHandlerScope.implementation(dependency: Any) = dependencies.add("implementation", dependency)
|
||||
private fun DependencyHandlerScope.testImplementation(dependency: Any) = dependencies.add("testImplementation", dependency)
|
||||
private fun DependencyHandlerScope.testReleaseImplementation(dependency: Any) = dependencies.add("testReleaseImplementation", dependency)
|
||||
internal fun DependencyHandler.implementation(dependency: Any) = add("implementation", dependency)
|
||||
|
||||
// Implementation + config block
|
||||
|
|
@ -36,7 +37,10 @@ private fun DependencyHandlerScope.releaseImplementation(dependency: Any) = depe
|
|||
/**
|
||||
* Dependencies used for unit tests.
|
||||
*/
|
||||
fun DependencyHandlerScope.testCommonDependencies(libs: LibrariesForLibs) {
|
||||
fun DependencyHandlerScope.testCommonDependencies(
|
||||
libs: LibrariesForLibs,
|
||||
includeTestComposeView: Boolean = false,
|
||||
) {
|
||||
testImplementation(libs.androidx.test.ext.junit)
|
||||
testImplementation(libs.coroutines.test)
|
||||
testImplementation(libs.molecule.runtime)
|
||||
|
|
@ -46,6 +50,10 @@ fun DependencyHandlerScope.testCommonDependencies(libs: LibrariesForLibs) {
|
|||
testImplementation(libs.test.truth)
|
||||
testImplementation(libs.test.turbine)
|
||||
testImplementation(project(":tests:testutils"))
|
||||
if (includeTestComposeView) {
|
||||
testImplementation(libs.androidx.compose.ui.test.junit)
|
||||
testReleaseImplementation(libs.androidx.compose.ui.test.manifest)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue