Gradle: buildscript configuration respect inheritance
(cherry picked from commit 0f133cf)