Enable running gradle tasks to compile test sources before running unit tests.

Also made variant selection a bit more robust by directly basing it on the android model.
ensure library projects get before task, add update info