Fixed some issues with unit test runner and added gradle application plugin support