Gradle plugin

What it configures

Everything the plugin sets, project by project. A root build that only applies it gets all of this.

Every project

SettingValue
groupproject-group from gradle.properties, when set
versionproject-version from gradle.properties, when set
RepositoriesmavenCentral()

The root project also gets a clean task that deletes its build/ folder, unless the root build declares one itself.

Every subproject with a build file

A subproject without a build.gradle, such as an intermediate platforms folder, is left bare. The others get:

Published modules

A subproject whose name or path is in publishedModules (default api, common, bukkit) also gets maven-publish and the settings in Publishing. If it declares no publication of its own, the plugin adds mavenJava from its java component.

Shaded modules

A subproject whose name or path is in shadowModules (default engine) gets com.gradleup.shadow applied. Shadow 9.4.1 is a dependency of the plugin, so it is on the build classpath for every module, and any module can apply id 'com.gradleup.shadow' with no version.

To build with a newer Shadow, declare it in the root build beside this plugin: id 'com.gradleup.shadow' version '9.6.1' apply false. The root declaration wins the classpath.

When it happens

Each subproject is configured just before its own build file runs. By then the root build script has finished, so its mcengineBuild { } values are known, and a module's build file already sees java and maven-publish applied and can configure them.

Module lists match a subproject by name (engine) or by full path (:platforms:engine).

← Getting started Configuration →