Update gradle build

The build is now compatible with API 9 and above.