Added support for building project using gradle. Changes are backward compatible and still allow building using Eclipse and old style project structure