Make it build with and work with gradle2