Fix some more deprecated methods for gradle 2.0