Move the buildscript block into a plugin..?

Then at the very least there should be an option to allow people to “include” code blocks defined in other files verbatim into your settings.gradle and build.gradle.

// build.gradle:

include(“…/…/buildscriptblock.gradle”)

include(“/mnt/data/pool/common.gradle”)

The performance impact to parse for includes and paste them in would be basically zero (I did some tests).

Theoretically such an “include-hack” exists: Reuse of buildscript block - #6 by Dieter_K1 but in my case (I can go into details) it is not applicable.

At the moment I am duplicating a lot of build script code that could reside in a single file which I include in all my scripts. Moving the buildscript block into a plugin was my only hope to get a properly working version of verbatim includes.