Example
An example MetaBuild script. This written in Kotlin, but a real-world script would be written in a scripting language, such as Feather, Groovy, or maybe a kotlin script???
I prefer Feather, because it is easy to make it self-contained, using a "library" statement to include the metadata.jar file.
Properties
Functions
Builds build.gradle.kts for each Project, as well as a single gradle.properties file and a single settings.gradle.kts file.
If your project already contains a gradle wrapper, then this updates it to the default version of gradle. Otherwise, it adds the gradle wrapper (The command gradle must be on your path).
If your project already contains a gradle wrapper, then this updates it to the specified version of gradle. Otherwise, it adds the gradle wrapper (The command gradle must be on your path).
Specifies which version of the Kotlin plugin to use by all projects. Note, if you prefer, you can set this on a per-project basis using Project.kotlinVersion.
Stores meta-data used by Project.publishing.
Define which repositories to use for all projects.
Declare the root project.
Declares a subproject.
Sets the JVM toolChain version for all projects. If this is omitted, then defaultToolChain is used.