How to disable RoboBlender for RoboGuice

128 views Asked by At

According to the documentation of RoboGuice RoboBlender is optional. Also in the RoboBlender wiki you can find a section about disabling RoboBlender. You can either set an environment property or you do it programmatically.

My question is, how do you set the environment property in the app? I assume you can do that in your gradle build script or somewhere else inside the app (I'm using Android Studio). Or do you really have to set it via the terminal?

1

There are 1 answers

2
schnatterer On

I presume that using the environment variable roboguice.useAnnotationDatabases=false is intended for testing only. Why?

  • The doc says it's for testing and
  • the source code says it's testing.
  • Setting an environment variable that contains a dot on the shell is rather complicated. Can't imagine how to do it in Android.

However, if you encounter problems with roboblender in your robolectric tests (running in a "normal" JVM) you could easily set the environment variable for the test in eclipse or maven, for example.