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

compile grails-gradle-plugin with the Groovy version provided by Gradle #334

Merged
merged 5 commits into from
Sep 21, 2024

Conversation

jamesfredley
Copy link
Contributor

@jamesfredley jamesfredley commented Sep 17, 2024

to ensure build compatibility with Gradle, currently Groovy 3.0.x see: https://docs.gradle.org/current/userguide/compatibility.html#groovy

This will prevent running into Groovy 4 vs 3 compatibility issues like: bertramdev/asset-pipeline#350, when Gradle executes the build using it's embedded Groovy Version, currently 3.0.22.

This will also be done on grails-gradle-model, grails-shell and grails-bootstrap in grails-core. grails/grails-core#13653

Move all versions numbers to gradle.properties and update dependencies to latest compatible version

Simplify ext."signing.*"

@matrei
Copy link
Contributor

matrei commented Sep 18, 2024

Is this a safe-guard for future changes to the build?
Because, as far as I can tell Groovy 4 is not on the compileClasspath right now.

./gradlew dI --dependency groovy --configuration compileClasspath

> Task :dependencyInsight
No dependencies matching given input were found in configuration ':compileClasspath'

This would also need to be done on grails-bootstrap, grails-gradle-model and grails-shell.

These however, do have Groovy 4 on the compileClasspath, and grails-shell in particular also has org.apache.groovy:groovy-ant, org.apache.groovy:groovy-json, org.apache.groovy:groovy-jmx and org.apache.groovy:groovy-xml in api scope which, I believe, is why we need this in the grails-gradle-plugin build.gradle:

// resolve conflict from Gradle's version of Groovy. Not needed if Gradle switches to 4.0
configurations.configureEach { exclude group: 'org.apache.groovy' }

@jamesfredley
Copy link
Contributor Author

Yes, this change plus similar compile changes on grails-bootstrap, grails-gradle-model and grails-shell will be a safeguard against future changes that could result in a release that breaks build and is not caught until after release. This change can/will be limited to compileOnly for these 4 projects.

Recent changes to grails-gradle-plugin had us move to groovy 4 and then back to 3. The need to ensure Groovy 3 is used to compile was illustrated by the asset-pipeline-gradle:5.0.0 release and it seemed like a good idea to do the same in Grails.

@jamesfredley jamesfredley force-pushed the jamesfredley/fix-use-gradle-groovy-version branch from f801917 to e384def Compare September 20, 2024 20:43
@jamesfredley jamesfredley merged commit c28e624 into 7.0.x Sep 21, 2024
6 checks passed
@jamesfredley jamesfredley deleted the jamesfredley/fix-use-gradle-groovy-version branch September 21, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants