Why should I update?
-
Java 8 has reached EOL, so if we want to start using Java 11 it is important migrate to Grails 5 that uses Groovy 3.x and supports Java 11.
-
Grails 4 will be discontinued at the end of 2023, if you have plans to continue using your application in production you need to keep your project updated.
-
Grails 5 it’s the most recent version of the framework, so provides an easy way to update to futures versions.
Steps to upgrade to Grails 5
- Update your gradle version in
gradle/wrapper/gradle-wrapper.properties, Grails 5 is using Gradle 7.2 and laterdistributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zipalso you can run this command./gradlew wrapper --gradle-version 7.2 - Update your grailsVersion, gorm.version and groovyVersion in your
gradle.properties
grailsVersion=5.2.0
groovyVersion=3.0.7
gorm.version=7.2.0 - Update your
views-gradleshould be like this"org.grails.plugins:views-gradle:2.3.2" - In your
build.gradleyou need to useimplementationinstead ofcompile,providedRuntimeinstead ofprovided,runtimeOnlyinstead ofruntime,testImplementationinstead oftestCompile