fix deprecation warnings in gradle build