Netflix/mantis

Specify all 3rdparty dependencies in the root build.gradle file

sundargates opened this issue · 4 comments

Context

Mantis has several sub-projects, and every sub-project depends on several 3rd party dependencies. Therefore, we would like consistency around how the 3rd party dependencies are defined and their versions. This would ensure a consistent set of jars in the classpath irrespective of the project that's getting deployed.

To achieve this goal, we introduced a new format for defining 3rd party dependencies in subprojects, as shown below.

implementation libraries.slf4jApi (correct)
implementation "org.slf4j:slf4j-api:${versions.slf4j}" (wrong)
implementation "org.slf4j:slf4j-api:1.2.3" (wrong)

Corresponding root.gradle changes:

ext.libraries = [
  slf4jApi       : "org.slf4j:slf4j-api:${versions.slf4j}"
]

This type of definition achieves the goal defined earlier. However, it is yet to be fully adopted. This ticket aims to do this cleanup for every subproject within mantis and create one or more PRs.

If you will work on this ticket, please create multiple PRs or have multiple commits for every subproject you have refactored to ensure it's easy to review the code.

Hi @sundargates! Thank you for this context, I have read through it and currently working through making these changes in each subproject. I'll keep an eye on mantis-api when #340 is resolved as well if necessary and update here if I have any further questions.

hey @sundargates may be I can help in this if you can guide me more on the process. I have to change the code of dependencies or anything else? I am new to this

@mabelbot Do you want me to assign this ticket to you? I would prefer that we do these changes module by module. However, since mantis-api has yet to be merged, you can ignore that PR for now.

@sundargates Yes, sure! We are on the same page w/ doing the changes module by module. It seems some might already be fully with the new format so I've started with ones that are only partially done. I'll chat with you on Discord about this & that tutorial build issue I ran into. Thanks!