-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Running Robolectric SNAPSHOT
utzcoz edited this page Nov 17, 2021
·
14 revisions
- Clone the robolectric repository:
git clone --recurse-submodules https://github.com/robolectric/robolectric
. - Check out the branch/commit that you want to run.
- Run
./gradlew publishMavenJavaPublicationToMavenLocal
in the Robolectric root directory. It is also faster to runSKIP_JAVADOC=true ./gradlew publishMavenJavaPublicationToMavenLocal
. If you can't run it on Ubuntu 20.04 with icu building problem, you canexport CC=gcc
andexport CXX=g++
at your terminal before running this command to fix building problem temporarily. - Add
mavenLocal()
to your project's root project build.gradle:allprojects { repositories { mavenCentral() google() mavenLocal() } }
- Update your project to use the SNAPSHOT version of Roblectric (4.8-SNAPSHOT at time of writing).
dependencies { ... testImplementation 'org.robolectric:robolectric:4.8-SNAPSHOT' ... }
- Run your project's tests.