fix gradlew script and upgrade gradle version to latest