This project provides build rules for integrating robolectric into bazel projects.
See Robolectric Getting Started for usage instructions.
To update BUILD, and robolectric.bazel for a new version of Robolectric use bazel's generate workspace tool.
bazel run //generate_workspace -- \
--artifact=org.robolectric:robolectric:4.0.2 \
--repositories=https://central.maven.org/maven2 \
--repositories=https://jcenter.bintray.com \
--repositories=https://maven.google.com
Copy the generated_maven_jars() function from the generated generate_workspace.bzl to robolectric.bzl.