Running Robolectric SNAPSHOT
utzcoz edited this page Apr 5, 2023
·
14 revisions
- Clone the robolectric repository:
git clone 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
. - 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.10-SNAPSHOT at time of writing).
dependencies { ... testImplementation 'org.robolectric:robolectric:4.10-SNAPSHOT' ... }
- Run your project's tests.