Upgrading Legacy Application to Gradle7.2

Hi ,

How can i upgrade org.grails.grails-web & org.grails.grails-gsp for legacy applications . I wanted to upgrate the application from Gradle 3.5 to 7.2?

apply plugin:“org.grails.grails-web”
apply plugin:“org.grails.grails-gsp”

Error I’m getting

Adding a Configuration as a dependency is a confusing behavior which isn’t recommended. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. If you’re interested in inheriting the dependencies from the Configuration you are adding, you should use Configuration#extendsFrom instead. See Configuration - Gradle DSL Version 7.2 for more details.
at build_ah3urt9sao6xsh8vhzzdv6kvd.run(C:\Project\workspace\build.gradle:30)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The Report.enabled property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the required property instead. See Report - Gradle DSL Version 7.2 for more details.
at build_ah3urt9sao6xsh8vhzzdv6kvd.run(C:\Project\workspace\build.gradle:30)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the mainClass property instead. See JavaExec - Gradle DSL Version 7.2 for more details.
at build_ah3urt9sao6xsh8vhzzdv6kvd.run(C:\Project\workspace\build.gradle:30)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The AbstractCompile.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the destinationDirectory property instead. Consult the upgrading guide for further information: Upgrading your build from Gradle 7.x to the latest
at build_ah3urt9sao6xsh8vhzzdv6kvd.run(C:\Project\workspace\build.gradle:34)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The AbstractArchiveTask.archiveName property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the archiveFileName property instead. See AbstractArchiveTask - Gradle DSL Version 7.2 for more details.
at build_ah3urt9sao6xsh8vhzzdv6kvd$_run_closure5.doCall(C:\Project\workspace\build.gradle:132)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The AbstractArchiveTask.appendix property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the archiveAppendix property instead. See AbstractArchiveTask - Gradle DSL Version 7.2 for more details.

Other Details

dependencies {
classpath “org.grails:grails-gradle-plugin:$grailsVersion”
classpath “gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:1.1”
classpath “gradle.plugin.com.energizedwork:idea-gradle-plugins:1.4”
classpath “org.grails.plugins:hibernate5:${gormVersion-”.RELEASE"}"
classpath “com.bertramlabs.plugins:asset-pipeline-gradle:4.3.0”
}

apply plugin:“eclipse”
apply plugin:“idea”
apply plugin:“war”
apply plugin:“org.grails.grails-web”
apply plugin:“com.energizedwork.webdriver-binaries”
apply plugin:“com.energizedwork.idea-project-components”
apply plugin:“asset-pipeline”
apply plugin:“org.grails.grails-gsp”

You should not use the legacy way of applying plugins, but the plugins { ... } block, I recommend for a smoother upgrade experience to not skip major Gradle versions, but

  • update all plugins
  • update to latest minor Gradle version within the same major version
  • fix all deprecation warnings
  • update to latest minor Gradle version within the next major version

But anyway, you did not share any errors, just some deprecation warnings that tell you that your build will not be compatible with Gradle 8 without changes.

I tried to update build.gradle based on your input but build is failing with an exception

apply plugin:“eclipse”
apply plugin:“war”
apply plugin:“org.grails.grails-web”
apply plugin:“com.energizedwork.webdriver-binaries”
apply plugin:“com.energizedwork.idea-project-components”
apply plugin:“asset-pipeline”
apply plugin:“org.grails.grails-gsp”

updated to

plugins {
	id 'eclipse'
	id 'idea'
	id 'war'
	id "yakworks.grails-web" version "2.7.5"
	id "com.energizedwork.webdriver-binaries" version "1.4"
	id "com.energizedwork.idea-project-components" version "1.4"
	id "com.bertramlabs.asset-pipeline" version "4.4.0"
	id 'org.grails.grails-gsp'
}

From where i can find the latest plugin for org.grails.grails-gsp with version ?

Exception

* What went wrong:
Plugin [id: 'org.grails.grails-gsp'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.grails.grails-gsp'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPluginRequestApplicator.java:222)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.lambda$resolvePluginRequests$4(DefaultPluginRequestApplicator.java:148)
        at org.gradle.util.internal.CollectionUtils.collect(CollectionUtils.java:207)
        at org.gradle.util.internal.CollectionUtils.collect(CollectionUtils.java:201)

Where did you define the version before?
Usually, you find the plugins on the plugin portal, unless someone decides to not publish there unwisely.
Then you have to check that plugins website.
But somewhere you should already have the version defined, or it would not have been found before either.