-
Notifications
You must be signed in to change notification settings - Fork 6
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
requireAllDefinedDependencies gives error when dependency only appears in runtimeClasspath #47
Comments
Hi, I've created a reproducible sample at https://github.com/unlimitedsola/gradlex-jpms-47 . You can reproduce the issue by executing The error output is available at: https://github.com/unlimitedsola/gradlex-jpms-47/actions/runs/4791130620/jobs/8521154924#step:4:81 I'm sorry the dependency graph is a bit messy as it was copied from a real project, and I couldn't think of any other libraries that were built from Gradle without module information at the moment. |
Thank you for trying the feature and reporting. I expected this to not yet work for all cases. The reproducer is very helpful! I will have a look. |
Thanks again @unlimitedsola your reproducer and analysis made this easy for me to fix. Your analysis is correct. The The fix will be released in Unfortunately, I saw that it won't be that simple to turn these Kotlin libs into modules. There are split packages and I think also something unexpected with the service provider definitions. That's what I saw once I tried to run it with the fix. I think there is nothing wrong in the plugin, but if you should continue on this and find something else, let me know. |
Thanks for your quick fix ❤️! It works perfectly for me now (at least for my particular use case) 😆 |
First of all, thank you for this awesome plugin!
When invoking
requireAllDefinedDependencies
on a dependency that has other dependencies that are only available inimplementation
configuration, it gives aCannot find dependencies for 'x'. Are 'x' the correct component coordinates?
error message.This issue might be related to how Gradle's
application
plugin handles the dependency graph differently than normal compilations, as it only fails on:startScripts
task, not:classes
, but I'm not entirely sure.From debugging, I notice that code located at here will throw an exception if either
compile
orruntime
classpath is null. But in situations where a dependency "A" wraps another dependency "B" using theimplementation
configuration, the dependency "B" will only appear on theruntime
classpath. Still, I'm not sure why normal compilation (:classes
) will pass, I assume in normal compilations both classpath will return empty list instead of null?I'll provide a reproducible sample project in the comment section.
The text was updated successfully, but these errors were encountered: