Skip to content

Commit

Permalink
Upgrade Roboletric
Browse files Browse the repository at this point in the history
  • Loading branch information
seadowg committed Jan 10, 2022
1 parent 7c73f6e commit 9cd34b2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions androidshared/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
instrumentedPackages=androidx.loader.content
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/dependencies/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ object Dependencies {
const val okhttp3_mockwebserver = "com.squareup.okhttp3:mockwebserver:${Versions.okhttp3}"
const val kotlinx_coroutines_test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.2"
const val hamcrest = "org.hamcrest:hamcrest:2.2"
const val robolectric = "org.robolectric:robolectric:4.5.1"
const val robolectric_shadows_multidex = "org.robolectric:shadows-multidex:4.5.1"
const val robolectric = "org.robolectric:robolectric:4.7.3"
const val robolectric_shadows_multidex = "org.robolectric:shadows-multidex:4.7.3"
const val uiautomator = "androidx.test.uiautomator:uiautomator:2.2.0"
}
2 changes: 2 additions & 0 deletions collect_app/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
application=org.odk.collect.android.application.RobolectricApplication
instrumentedPackages=androidx.loader.content

8 changes: 5 additions & 3 deletions download-robolectric-deps.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
set -e

wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all/6.0.1_r3-robolectric-r1/android-all-6.0.1_r3-robolectric-r1.jar -P robolectric-deps
wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all/7.0.0_r1-robolectric-r1/android-all-7.0.0_r1-robolectric-r1.jar -P robolectric-deps
wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all/11-robolectric-6757853/android-all-11-robolectric-6757853.jar -P robolectric-deps
wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all-instrumented/6.0.1_r3-robolectric-r1-i3/android-all-instrumented-6.0.1_r3-robolectric-r1-i3.jar -P robolectric-deps
wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all-instrumented/7.0.0_r1-robolectric-r1-i3/android-all-instrumented-7.0.0_r1-robolectric-r1-i3.jar -P robolectric-deps
wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all-instrumented/11-robolectric-6757853-i3/android-all-instrumented-11-robolectric-6757853-i3.jar -P robolectric-deps
wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all-instrumented/12-robolectric-7732740-i3/android-all-instrumented-12-robolectric-7732740-i3.jar -P robolectric-deps

mkdir -p collect_app/src/test/resources && cp robolectric-deps.properties "$_"
mkdir -p audiorecorder/src/test/resources && cp robolectric-deps.properties "$_"
mkdir -p projects/src/test/resources && cp robolectric-deps.properties "$_"
mkdir -p location/src/test/resources && cp robolectric-deps.properties "$_"
mkdir -p androidshared/src/test/resources && cp robolectric-deps.properties "$_"
mkdir -p geo/src/test/resources && cp robolectric-deps.properties "$_"
mkdir -p permissions/src/test/resources && cp robolectric-deps.properties "$_"
1 change: 1 addition & 0 deletions permissions/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
instrumentedPackages=androidx.loader.content
9 changes: 4 additions & 5 deletions robolectric-deps.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
org.robolectric\:android-all\:6.0.1_r3-robolectric-r1=../../../../../../robolectric-deps/android-all-6.0.1_r3-robolectric-r1.jar
org.robolectric\:android-all\:7.0.0_r1-robolectric-r1=../../../../../../robolectric-deps/android-all-7.0.0_r1-robolectric-r1.jar
org.robolectric\:android-all\:9-robolectric-4913185-2=../../../../../../robolectric-deps/android-all-9-robolectric-4913185-2.jar
org.robolectric\:android-all\:10-robolectric-5803371=../../../../../../robolectric-deps/android-all-10-robolectric-5803371.jar
org.robolectric\:android-all\:11-robolectric-6757853=../../../../../../robolectric-deps/android-all-11-robolectric-6757853.jar
org.robolectric\:android-all-instrumented\:6.0.1_r3-robolectric-r1-i3=../../../../../../robolectric-deps/android-all-instrumented-6.0.1_r3-robolectric-r1-i3.jar
org.robolectric\:android-all-instrumented\:7.0.0_r1-robolectric-r1-i3=../../../../../../robolectric-deps/android-all-instrumented-7.0.0_r1-robolectric-r1-i3.jar
org.robolectric\:android-all-instrumented\:11-robolectric-6757853-i3=../../../../../../robolectric-deps/android-all-instrumented-11-robolectric-6757853-i3.jar
org.robolectric\:android-all-instrumented\:12-robolectric-7732740-i3=../../../../../../robolectric-deps/android-all-instrumented-12-robolectric-7732740-i3.jar

0 comments on commit 9cd34b2

Please sign in to comment.