How to properly upgrade Gradle in composite builds?

This is related to the following question: