5.5 Building with Gradle
Grails 3.1 uses the Gradle Build System for build related tasks such as compilation, runnings tests and producing binary distrubutions of your project. It is recommended to use Gradle 2.2 or above with Grails 3.1.
The build is defined by the build.gradle
file which specifies the version of your project, the dependencies of the project and the repositories where to find those dependencies (amongst other things).
When you invoke the grails
command the version of Gradle that ships with Grails 3.1 (currently 2.9) is invoked by the grails
process via the Gradle Tooling API:
# Equivalent to 'gradle classes'
$ grails compile
You can invoke Gradle directly using the gradle
command and use your own local version of Gradle, however you will need Gradle 2.2 or above to work with Grails 3.0:
$ gradle assemble