Fix gradle build issues