Fix gradle build script

Old script broken down in these days.