Updated build script to make it compliant with gradle 2.0