Use DependencyHandlerScope.testCommonDependencies()
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user