Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle version for "create-app" doesn't match other grails commands #13060

Closed
SquareGearsLogic opened this issue Jul 13, 2023 · 2 comments
Closed

Comments

@SquareGearsLogic
Copy link

SquareGearsLogic commented Jul 13, 2023

Expected Behavior

Hi,

The version of gradle is expected to be the same for "create-app" and other commands, like "war", "run", but it's not always so.

I'm not sure where to find the proper gradle version number for those commands, for example, for Grails 5.3.3 it is listed as 6.9.4 at https://github.com/grails/grails-core/blob/v5.3.3/gradle/wrapper/gradle-wrapper.properties and 6.9.3 at https://github.com/grails/grails-gradle-plugin/blob/5.3.x/gradle/wrapper/gradle-wrapper.properties

Actual Behaviour

The problem is that inconsistent gradle versions may cause unexpected gradle behavior, here is an example:

For grails 5.3.3 (and same for 5.3.2), the "grails create-app" spawns gradle\wrapper\gradle-wrapper.properties with

distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip

that later causes this gradle bug: gradle/gradle#17236 when I build my grails project.
If I simply run "grails war" or "grails run", it will use 7.2, but if I delete gradle folder, it surprisingly creates .gradle\buildOutputCleanup\cache.properties with

gradle.version=6.9

This version I like more, because it doesn't cause that gradle bug, and my project builds just fine. I don't care what's the correct one, but both ways I expect grails to use exactly same version of gradle. Please correct me if I'm wrong.

Steps To Reproduce

No response

Environment Information

OpenJDK 1.8

Example Application

No response

Version

5.3.3 and 5.3.2

@puneetbehl
Copy link
Contributor

The Grails Core and Grails Gradle Plugin use a different Gradle version to build the project. And, the Grails application ships with Gradle 7. They don't need to be using the same Gradle version across all the projects.

@puneetbehl
Copy link
Contributor

We suggest using the relevant Gradle commands instead of ./grailsw. As we move forward with Grails 6, duplicate commands have been eliminated, and it is preferable to rely on Gradle commands for your tasks.

Make sure you catch up on the latest blog about the release of Grails 6 at https://grails.org/blog/2023-07-25-introducing-grails-6.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants