Fix Gradle build error and timeout.