Skip to content

Conversation

@labkey-susanh
Copy link
Contributor

Rationale

It is generally best practice to explicitly declare dependencies that are used in your code rather than relying on transitive dependencies to supply them for you if for no other reason than it documents what is in use. Though in reality the risk of these transitive dependencies disappearing is low and would usually be easily noticed, the declaration of proper api dependencies will assure that our published pom files are accurate and others will not have to separately declare some dependencies that we rely on when using our jar files.

The changes made here were done with the help of this Gradle dependency-analysis plugin, which is still not at v1.0 and seems to have a few quirks, but my spot checks of the suggestions given seem like they provide solid advice.

Some of the dependencies we have been declaring in the api module are no longer (perhaps never were) used within that module, so a few other modules have been updated to include these dependencies. This means, of course, that some jar files will be included twice for certain distributions, but there are not many and this is part of the price of keeping things modular. However, if the repetition of things like commons-math3 seems cumbersome or silly we can go back to including these in api (at least for now), but it is really best practice to own up to your dependencies.

Related Pull Requests

  • Coming soon

Changes

  • Update dependency declarations

api/build.gradle Outdated

List charting = [
"org.jfree:jfreechart:${jfreechartVersion}"
"org.jfree:jfreechart:${jfreechartVersion}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Intentional trailing comma?

api/build.gradle Outdated

List charting = [
"org.jfree:jfreechart:${jfreechartVersion}"
"org.jfree:jfreechart:${jfreechartVersion}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Trailing comma?

@labkey-susanh labkey-susanh merged commit 2cc8bff into develop Sep 22, 2020
@labkey-susanh labkey-susanh deleted the fb_dependencyHealth branch September 22, 2020 14:56
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.

5 participants