From ef61d81d8d81575342a1b0b5331cd6a87a5d65aa Mon Sep 17 00:00:00 2001 From: ibaker Date: Fri, 2 Jul 2021 17:35:14 +0100 Subject: [PATCH] Upgrade to Robolectric 4.6 The tests now pass without @DoNotInstrument I had to tweak the jetification settings due to a bug in the jetifier shipped with the Android Gradle Plugin. More details: https://github.com/robolectric/robolectric/issues/6521#issuecomment-851736355 PiperOrigin-RevId: 382757006 --- constants.gradle | 2 +- gradle.properties | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/constants.gradle b/constants.gradle index b6c93bf785..345928f803 100644 --- a/constants.gradle +++ b/constants.gradle @@ -24,7 +24,7 @@ project.ext { guavaVersion = '27.1-android' mockitoVersion = '3.4.0' mockWebServerVersion = '3.12.0' - robolectricVersion = '4.5.1' + robolectricVersion = '4.6' checkerframeworkVersion = '3.3.0' checkerframeworkCompatVersion = '2.5.0' jsr305Version = '3.0.2' diff --git a/gradle.properties b/gradle.properties index 297016aec1..9d8bb3e2b6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,7 @@ ## Project-wide Gradle settings. android.useAndroidX=true android.enableJetifier=true +# https://github.com/robolectric/robolectric/issues/6521#issuecomment-851736355 +android.jetifier.blacklist=bcprov buildDir=buildout org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m