How do I include buildscript block from external gradle script?

In external scripts (we call them script plugins), plugin IDs cannot be used. Instead, the fully qualified class name has to be used. This is a known bug.

Secondly, externalizing a build script block into a script plugin isn’t supported. (It’s a tough problem, and can’t think of a good way to implement this.) You may have to live with some duplication, at least for the time being. Remember that dependencies specified in a project’s ‘buildscript’ block are visible to all subprojects. Hence, as long as you don’t need dependencies to be available in a script plugin, you just need to declare them in the root project’s build script.