////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////

Dependencies for your project are defined in the `dependencies` block. In general, you can follow the https://docs.gradle.org/current/userguide/dependency_management_for_java_projects.html[Gradle documentation on dependency management] to understand how to configure additional dependencies.

The default dependencies for the Grails Web application can be seen below:

[source,groovy]
----
dependencies {
    profile "org.apache.grails.profiles:web"
    testAndDevelopmentOnly "org.webjars.npm:bootstrap"
    testAndDevelopmentOnly "org.webjars.npm:bootstrap-icons"
    testAndDevelopmentOnly "org.webjars.npm:jquery"
    implementation platform("org.apache.grails:grails-bom:$grailsVersion")
    implementation "org.apache.grails:grails-core"
    implementation "org.apache.grails:grails-logging"
    implementation "org.apache.grails:grails-databinding"
    implementation "org.apache.grails:grails-interceptors"
    implementation "org.apache.grails:grails-rest-transforms"
    implementation "org.apache.grails:grails-services"
    implementation "org.apache.grails:grails-url-mappings"
    implementation "org.apache.grails:grails-web-boot"
    implementation "org.apache.grails:grails-gsp"
    implementation "org.apache.grails:grails-data-hibernate5"
    implementation "org.apache.grails:grails-scaffolding"
    implementation "org.springframework.boot:spring-boot-autoconfigure"
    implementation "org.springframework.boot:spring-boot-starter"
    implementation "org.springframework.boot:spring-boot-starter-actuator"
    implementation "org.springframework.boot:spring-boot-starter-logging"
    implementation "org.springframework.boot:spring-boot-starter-tomcat"
    implementation "org.springframework.boot:spring-boot-starter-validation"
    console "org.apache.grails:grails-console"
    runtimeOnly "cloud.wondrify:asset-pipeline-grails"
    runtimeOnly "com.h2database:h2"
    runtimeOnly "com.zaxxer:HikariCP"
    runtimeOnly "org.fusesource.jansi:jansi"
    integrationTestImplementation testFixtures("org.apache.grails:grails-geb")
    testImplementation "org.apache.grails:grails-testing-support-datamapping"
    testImplementation "org.apache.grails:grails-testing-support-web"
    testImplementation "org.spockframework:spock-core"
}
----

Note that version numbers are not present in the majority of the dependencies.

This is thanks to the Spring dependency management plugin which automatically configures `grails-bom` as a Maven BOM via the Grails Gradle Plugin.  This defines the default dependency versions for most commonly used dependencies and plugins.

For a Grails App, applying `org.grails:grails-gradle-plugin` will automatically configure the `grails-bom`.  No other steps required.

For Plugins and Projects which do not use `org.grails:grails-gradle-plugin`, you can apply the `grails-bom` in one of the following two ways.

build.gradle, using Gradle Platforms:
[source,groovy]
----
dependencies {
    implementation platform("org.apache.grails:grails-bom:{GrailsVersion}")
    // all other dependencies
}
----

build.gradle, using Spring dependency management plugin:
[source,groovy]
----
dependencyManagement {
    imports {
        mavenBom 'org.apache.grails:grails-bom:{GrailsVersion}'
    }
    applyMavenExclusions false
}
----
