What is Maven <parent> in Gradle?

In Gradle you only have a parent->child relationship in a multi-module project. You do not have a child->parent definition as you have in Maven.

So you usually have a parent folder where you have a settings.gradle that contains the references to its children.

Like so (parent settings.gradle):

include 'sub-module-1'
include 'sub-module-2

Then you have two sub-folder sub-module-1 and sub-module-2 which contains their own build.gradle files.

But, coming back to your case, you don't need to have any of that when you are just using the spring-boot plugin org.springframework.boot plugin will configure all the necessary dependencies so you only need to add the optional dependencies you want.


What is the equivalent of following Gradle parent syntax, in Maven

apply plugin : "io.spring.dependency-management"


dependencyManagement {
    imports {
        mavenBom "org.springframework.boot:spring-boot-starter-parent:${springBootVersion}"
    }
}