How can I handle split packages in automatic modules?

ぐ巨炮叔叔 提交于 2019-12-04 03:21:20

After some more testing, I think there are a few options which should tackle many (but definitely not all) 3rd party split package situations.

  1. Clean up dependencies - maybe a dependency isn't actually needed or can be replaced by a newer (or more distinct) JAR
  2. Restructure your own module into two modules, each reading the package from one of both 3rd party modules (if possible/reasonable)
  3. wrap one of the 3rd party modules (or both) in a simple module, which does nothing but explicitly export only the package(s) that are actually needed by your module.

Depending on the situation, one of these options might be a good fit to resolve the split package problem. But none of them can handle situations in which a coherent piece of code actually needs to access classes from both parts of the split package.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!