-
Notifications
You must be signed in to change notification settings - Fork 470
Fix gradle module metadata dependencies #1490
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
Fix gradle module metadata dependencies #1490
Conversation
93b073b
to
0f03ebe
Compare
0f03ebe
to
ade3add
Compare
implementation "com.google.inject:guice:3.0", provided | ||
compileOnly "com.google.inject:guice:3.0" | ||
testImplementation "com.google.inject:guice:3.0" |
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.
Shouldn't these (and below for the other specific modules) be normal implementation
dependencies? Consumers could still use different versions by using Gradle's dependency management capabilities.
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.
They had been marked as provided
in Maven, which basically makes them non-transitive. This PR just aligns the behavior between Gradle and Maven. And you shouldn't get your DI framework from the test framework as transitive dependency, it should be a compile
/implementation
dependency.
Prior to this commit, the gradle module metadata didn't match the generated pom, it included more dependencies as Gradle has no concept of provided/optional dependencies. To fix this we consequently use `compileOnly` for dependencies that are optional. This will omit these dependencies from both the pom and gmm. fixes spockframework#1469
ade3add
to
2bd6832
Compare
Codecov Report
@@ Coverage Diff @@
## master #1490 +/- ##
=========================================
Coverage 79.73% 79.73%
- Complexity 4023 4025 +2
=========================================
Files 411 411
Lines 12715 12715
Branches 1650 1649 -1
=========================================
Hits 10138 10138
Misses 1982 1982
Partials 595 595 Continue to review full report at Codecov.
|
Prior to this commit, the gradle module metadata didn't match the generated pom,
it included more dependencies as Gradle has no concept of provided/optional dependencies.
To fix this we consequently use
compileOnly
for dependencies that are optional.This will omit these dependencies from both the pom and gmm.
fixes #1469