Use safe way to set Gradle home dir