title: How to set the build variant programmatically at runtime in Android Studio?
body: <p>Is it possible to change the build variant Programmatically run time in Android Studio?</p>
  <p>I have different server environments (Release, Debug, Production, Dev, Dev1, Dev2, QA, etc.). The code itself relies on some strings, SDK's initialization, and server addresses that are set when I pick my build variant. So when I pick debug for an instance, the string uses out debug server address and SDK's. The same for release.  But what if I want to be able to pick the environment during run-time?</p>