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

Add missing Groovy dependencies to the classpaths of Gretty Products #240

Merged
merged 2 commits into from
Oct 17, 2021

Conversation

f4lco
Copy link
Collaborator

@f4lco f4lco commented Oct 17, 2021

I must say I am very unfamiliar with Gretty's product code, but I could test this patch successfully with the instructions from #238 and the gretty-sample project. The number of classpaths Gretty maintains is mind-boggling.
Apparently, the fix consists of adding the Groovy dependencies:

Firstly, to the runner classpath for Gretty products. The entry was missing, because we duplicated code in between the normal Gretty execution and products. When we added the Groovy version selection at runtime, we forgot to update the product code. Commit 72deb14 removes the duplication.

Second, we add the Groovy dependencies to the configuration of the starter, the component that spawns runners for products.

@boris-petrov
Copy link
Member

Seems great, thanks! So my initial thought was right. Thanks for fixing and trying it out.

@boris-petrov boris-petrov merged commit 26ad9cf into gretty-3.x Oct 17, 2021
@boris-petrov boris-petrov deleted the 238-product-missing-groovy-dependencies branch October 17, 2021 21:21
@f4lco
Copy link
Collaborator Author

f4lco commented Oct 18, 2021

Indeed @boris-petrov, your comment was sending me the right way. tbh, this made a patch 10x more probable, because I did not have to get a foothold myself on code I hadn't worked on before, so many thanks 👍

@@ -89,6 +89,7 @@ class GrettyPlugin implements Plugin<Project> {

project.dependencies {
grettyStarter "org.gretty:gretty-starter:$grettyVersion"
grettyStarter ProjectUtils.getCurrentGroovy(project).dependencies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@f4lco - I'm using gradle-versions-plugin to check for dependency updates. Ever since updating to Gretty 3.0.7 which contains this change, I started getting these "possible updates":

- org.codehaus.groovy:groovy-cli-commons [3.0.8 -> 3.0.9]
    https://groovy-lang.org
- org.codehaus.groovy:groovy-json [3.0.8 -> 3.0.9]
    https://groovy-lang.org

I don't have these libraries in my project. I believe this is caused by the line I'm commenting on. Why was it added, are you sure that the rest of the changes in the PR are not enough for what it tries to fix?

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

Successfully merging this pull request may close these issues.

2 participants