-
Notifications
You must be signed in to change notification settings - Fork 418
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
Make Groovy an "Optional" dependency! #232
Comments
Groovy is required to compile the I don’t think it’s optional. Why do you want to make it optional? |
If it's used in non-groovy projects, no reason to include (and download) it.
Isn't it optional for the Java part? |
Ok. I see what you mean now. |
Looking at this Gradle blog,
|
@remkop that's the equivalent of Maven 'provided' - a little different from 'optional' |
I think this is okay because the doc says:
The second bullet point applies in our case I think. |
@remkop I don't think it's compileOnly since it's required at runtime too, if that part of the code is used, so it's optional: one needs it if one wants that part of the code to be used, otherwise not, independent how it was compiled. The main problem arises from the fact that there's only one JAR, where there are 2 "separate" functionality units (one for Java and one for Groovy).
|
POM for picocli-2.0.2 has this dependencies section:
We both agree that this is not desirable. With the I believe this is acceptable: only Groovy scripts would use the picocli.groovy classes. When running a Groovy script, the groovy-all dependency is provided by Groovy. I have tried to see what the result would be with the 'nebula-optional-base' plugin, but I have been unable to get it to work... Getting this error:
If we did get this to work, I believe (correct me if I'm wrong) that this would result in a POM like this:
Personally I would not mind the above but not having a |
@remkop I achieved the and the Your Gradle error seems to be related with the order of applying plug-ins. Independently how it's generated however, IMO the POM should contain |
Thanks for the links! I’ll give it another try but if I can’t make it work I might just go with the compileOnly/provided scope. Do you think you’ll be any issue with the provided scope? The |
Not really, but it would be perfect with the |
and this one too: gradle/gradle#867 needs voting, in order for Gradle to be able to do out-of-the-box what Maven already did since years :) . |
…y. Thanks to [aadrian](https://github.com/aadrian). Closes #232
I voted for the gradle/gradle#876 issue, but for the picocli-2.0.3 release I went with the compileOnly/provided scope. I could perhaps make the Most important is ensuring that picocli no longer has a required runtime dependency on groovy, and this has been achieved. |
Please make Groovy an optional dependency.
In 2.0.2 it seems to be a "required" one.
One possibility is by using:
Thank you.
The text was updated successfully, but these errors were encountered: