Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TWO APPROACHES – UPGRADE IN PLACE OR FRESH BUILD



Fresh build

  • Use grails cli to start a new grails 6 application with the right name.

  • Ensure gradle wrapper properties using 7.6.3 and set networkTimeout=10000

  • Move everything except gitignore and README from grails cli into a "service" directory, since this is the shape our modules are previously

  •  In build.gradle

    • Comment out "application" block

    • Comment out java sourceCompatibility block

    • Copy across

      • Group

      • Plugins/repositories

      • Configurations

      • "Custom deps" which definitely don't intefere with the bootstrapped grails 6 deps

      • Buildscript

    • NOTE - buildProperties no longer exists so for now comment out the generate descriptors blocks. Needs some input from Steve on how to proceed. (THIS NEEDS SORTING BEFORE RELEASE)

    • ./gradlew clean to check everything builds

    • Then work through dependencies in original app, cross referencing to new app's ones, and vice versa. Make changes, additions and comment out unnecessary ones

      • It is IMPORTANT to do this in both directions. There may be newer grails 6 dependencies that supercede older ones, so go through line by line in the "core" deps list and try to understand whether a dependency is missing because it's been superceded, or included because it's now no longer drawn in automatically via other deps etc etc.

      • The "custom dependencies" list can likely be pulled over verbatim though.

      • dependencies block:

        • Check grails gradle plugin version lines up with grailsVersion

        • Change hibernate5 plugin over to

          Code Block
              classpath "org.grails.plugins:hibernate5:$gormVersion"

          - ensure gormVersion exists (see below)

        • Change plugin views-gradle over to

          Code Block
              classpath "org.grails.plugins:views-gradle:3.1.2" /// Uh oh, this is breaking in grails-okapi
      • Possible exceptions

        • move spring-security core into the "proper" dependencies block and bump version up to grails version

          Code Block
            implementation("org.grails.plugins:spring-security-core:${grailsVersion}")

          Was in place to handle security issues present in grails 5

        • make sure web-toolkit and grails okapi are on grails6 versions (TBD on release)

    • MAKE SURE you copy across the profile declaration. This is no longer supplied by the CLI, so we need to make sure its there.

    • On that note, delete the grails cli yaml file (question)

    • Copy over bootJar.enabled stuff and eclipse block

    • May need to remove anything referencing configScript, as this appears to have been removed

    • Wrap the generateDescriptors task in

      Code Block
      project.gradle.projectsEvaluated {
      ...
      }

...

  • Bump gradle wrapper to 7.6.3 as above, set networkTimeout=10000 and make same changes to gradle.properties as above

  • Work through build.gradle in the same way as above

  • gradlew clean and run.