Fix  STS-3164

Problem: Gradle IDE does not respect sorting setting in core.prefs, when generated by Gradle on import.

Refresh project preferences after executing any beforeTasks.