Update Gradle build file.

 Do blocking work on the background.