Gradle newbie here, so I apologise if this is a daft question.
I have a number of different projects which are built by Gradle and I want to include in each a set of global settings - “repositories” and “sourceSets” definitions and some constants. What would be the best approach for achieving this, please?
One thing to be wary of with init scripts though is that the can potentially lead to non portable scripts, as they live outside of the build scope. This may or may not be what you want.
The simplest solution is to use a script plugin, available over HTTP as ‘sgalles’ suggests.
There are other options though such as binary plugins. See this chapter of the userguide for more detail.