gradle: Upgrade robolectric and add explicit dependency on hamcrest

Current hamcrest dependency was coming from robolectric but upgrading it
removed it.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta 2022-08-22 12:04:15 +05:30
parent dd49a4797e
commit 584a54b127

View file

@ -138,10 +138,11 @@ dependencies {
// anything less than 'implementation' fails tests run with gradlew
testImplementation rootProject.ext.aosp_libs
testImplementation 'androidx.test.ext:junit:1.1.3'
testImplementation('org.robolectric:robolectric:4.3.1') { // 4.4 has issue with non-idle Looper
testImplementation('org.robolectric:robolectric:4.8.1') {
// https://github.com/robolectric/robolectric/issues/5245
exclude group: "com.google.auto.service", module: "auto-service"
}
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version"
testImplementation "io.mockk:mockk:$mockk_version"