Minor refactoring in AsyncGradleTask.