-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Replace direct usage of compileOnly configuration for resolution #57123
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
Replace direct usage of compileOnly configuration for resolution #57123
Conversation
59d6dac to
9ad514e
Compare
mark-vieira
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the only thing is I think we can remove the usage of compileOnly in most, if not all cases, no? In reality what we want is either compileClasspath or runtimeClasspath. I think we are mistakenly referencing compileOnly in many cases. In the case where we all, dependencies, that is, everything we compile against and run against, that's were we are concatenating compileOnly with runtime, but could we just as well do compileClasspath + runtimeClasspath to get the same superset? We'd remove the duplicate jars of course to avoid jarHell but isn't that the same result? Then we can ditch any use of compileOnly altogether?
|
@mark-vieira I didn't want to change to much but we should definitely revisit the usage of compile only. I left it there for now as in the cases here its mainly used to solve use cases like this here explained by @rjernst #56998 (comment) |
- this also fixes an issue with having project dependencies in compile only declared being ignored so far
f2c2a85 to
6ee2864
Compare
Removes direct access to compileOnly which is deprecated for direct resolution. (see deprecation warning in build scan https://gradle-enterprise.elastic.co/s/v7ggsljig4i44/deprecations#deprecation-1 )
Fixes #56998